Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % MATLAB code using YALMIP
- clear variables
- x = sdpvar(8,1);
- Constraints = [(a'*diag(x)*b) <= 1e-3];
- Objective = -norm( diag(x) * (a+ b), 2);
- options = sdpsettings('verbose',1,'solver','baron');
- %options = sdpsettings('verbose',1,'solver','bmibnb');
- sol = optimize(Constraints,Objective,options);
- value(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement