How to solve equation min||wij ||subject to ||Cp-Pij ||22 ≤є what function to use ?
Mostra commenti meno recenti
How to solve equation min||wij ||subject to ||Cp-Pij ||22 ≤є what function to use in Matlab to solve this ?
Risposta accettata
Più risposte (1)
Youssef Khmou
il 11 Feb 2013
hi, Alex, i had once a program called "Simplex" but i lost it, anyway the best function is linprog :
Let us take an example : you have
Min f(x,y,z)=-5x-4y-6z
Subject to :
x - y + z <= 20
3x + 2y + 4z <= 42
3x + 2y <= 30
x,y,z > 0
Then :
f = [-5; -4; -6];A =[1 -1 1;3 2 4;3 2 0];
b = [20; 42; 30];
lb=zeros(3,1);
x=linprog(f,A,b,[],[],lb)
Optimization terminated.
x =
0.0000
15.0000
3.0000
Categorie
Scopri di più su Solver Outputs and Iterative Display 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!