linear equality constraint writing
Mostra commenti meno recenti
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 ≤ μ * Φ
Risposta accettata
Più risposte (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 Commento
Saifullah Khalid
il 21 Giu 2017
Categorie
Scopri di più su Nonlinear Optimization in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!