Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear; close all; clc;
- run s6p1_params_template
- % cvx_begin
- %
- % variables x(7) t;
- % maximize (t);
- % subject to
- % A*x == t*e;
- % x >= 0;
- % x <= d;
- %
- % cvx_end
- c = zeros(1, 8); c(8)=1;
- % A = [A ; zeros(1,7)];
- % A = [A ; zeros(7,1)];
- A = [A -1*e];
- % e = [e; 0]
- M = eye(8); M(8,:)=[];
- cvx_begin
- variables z(8);
- maximize (c*z);
- subject to
- A*z == 0;
- M*z >= 0;
- M*z <= d;
- cvx_end
Add Comment
Please, Sign In to add comment