linear equality constraint writing
Show older comments
I am facing difficulty to write linear inequality constraint given below. Here Φ, 48 element long vector, is decision variable where as P and μ are vectors of 48 elements each and λ is a constant. I shall appreciate any help.
λ * P ≤ μ * Φ
Accepted Answer
More Answers (1)
% take some random data for test
lambda = rand ;
P = rand(48,1) ;
mu = rand(48,1) ;
phi = rand(48,1) ;
% inequality
idx = lambda*P<=mu.*phi ;
%%check result
R = [lambda*P(idx) mu(idx).*phi(idx)]
1 Comment
Saifullah Khalid
on 21 Jun 2017
Categories
Find more on Nonlinear Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!