linear equality constraint writing
Ältere Kommentare anzeigen
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 ≤ μ * Φ
Akzeptierte Antwort
Weitere Antworten (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 Kommentar
Saifullah Khalid
am 21 Jun. 2017
Kategorien
Mehr zu Nonlinear Optimization finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!