How to solve equation min||wij ||subject to ||Cp-Pij ||22 ≤є what function to use ?
Show older comments
How to solve equation min||wij ||subject to ||Cp-Pij ||22 ≤є what function to use in Matlab to solve this ?
Accepted Answer
More Answers (1)
Youssef Khmou
on 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
Categories
Find more on 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!