Hello to everyone
I downloaded CVX on 23 Feb. I want to test the CVX for the first time and compare it with Linprog.
I wrote my code in Matlab command and I got results with CVX. However, I tried to save my code in mfile to run it. But, my code does not work in mfile!
I am so thankful if you let me CVX has a problem with the mfile of the MATLAB or not.
This is my code:
clear
clc
A=[1 -1 1;3 2 4; 3 2 0];
b=[20;42;30];
lb=zeros(3,1);
f=[-5,-4,-6];
cvx_begin
variable x(3)
minimize (fx)
subject to
lb <= Ax <= b
cvx_end