%% Cone Programming with Linear Constraints
% Specify an objective function vector and a single second-order cone constraint.

f = [-4;-9;-2];
Asc = diag([1,4,0]);
b = [0;0;0];
d = [0;0;1];
gamma = 0;
socConstraints = secondordercone(Asc,b,d,gamma);

% Specify a linear inequality constraint.

A = [1/4,1/9,1];
b = 5;

% Solve the problem.

[x,fval] = coneprog(f,socConstraints,A,b)

% Copyright 2020 The MathWorks, Inc.