문제

Trying to solve a linear programming problem:

Input:

  c = [2 3 -4 0 0]
Aeq = [1 1 1 0 0; 2 -1 0 1 0; 1 2 -1 0 1]
beq = [2;4;5]
lb  = [0;0;0;0;0]

x=linprog(c,[],[],Aeq,beq,lb,[])

And get this error:

Undefined function 'linprog' for input arguments of type'double'.

What do I have to do to make the function work? I have Matlab R2013a, installed only Matlab 8.1 from programs list.

도움이 되었습니까?

해결책

linprog is part of the optimization toolbox, type in ver to the available toolboxes. If you don't have a license which includes the toolbox, you can't use it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top