Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. % MATLAB code using YALMIP
  2. clear variables
  3. x = sdpvar(8,1);
  4. Constraints = [(a'*diag(x)*b) <= 1e-3];
  5. Objective = -norm( diag(x) * (a+ b), 2);
  6. options = sdpsettings('verbose',1,'solver','baron');
  7. %options = sdpsettings('verbose',1,'solver','bmibnb');
  8. sol = optimize(Constraints,Objective,options);
  9. value(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement