how to set Constraints in ‘optimize(Constraints,Objective,options);’ if I don't have any constrains in my problem

21 views
Skip to first unread message

Skye Lu

unread,
Aug 2, 2018, 6:58:47 AM8/2/18
to YALMIP
I don't have any constrains in my problem, I don't know how to set Constraints in ‘optimize(Constraints,Objective,options);’. 
Constraints = None?
Thanks a lot!
This is my code:
% Define variables
x = sdpvar(N,1);

% Define constraints 

% Define an objective
Objective = (lambda*norm( U(:,iter).*x, 1 )+ 0.5*sum((Dic* x-Output).^2) )

% Set some options for YALMIP and solver
options = sdpsettings('solver','sedumi','verbose',0)

% Solve the problem
sol = optimize(Constraints,Objective,options);


Johan Löfberg

unread,
Aug 2, 2018, 8:45:01 AM8/2/18
to YALMIP
Constraints = [];

Skye Lu

unread,
Aug 4, 2018, 12:30:27 AM8/4/18
to YALMIP
Hi Johan,
Thanks a lot for your reply. I have solved this. Thank you again!
Reply all
Reply to author
Forward
0 new messages