linprog function - error message

Hi,
I am trying to use the linprog function. To start with, I am simply copying the basic example provided in the function description
f = [-5; -4; -6];
A = [1 -1 1
3 2 4
3 2 0];
b = [20; 42; 30];
lb = zeros(3,1);
[x,fval,exitflag,output,lambda] = linprog(f,A,b,[],[],lb);
However, I keep gettting the following error:
??? Undefined function or method 'linprog' for input arguments of type 'double'.
Any idea why I get this error?
Thxs

답변 (1개)

Walter Roberson
Walter Roberson 2013년 2월 28일

0 개 추천

You do not have the Optimization toolbox installed, or else you do not have it licensed.

댓글 수: 3

Jean Marc
Jean Marc 2013년 2월 28일
thxs walter.
it is what I read whe I was looking for an answer. However, I can see the linprog.m file in:
C:\Program Files\MatLab\R2010a\toolbox\optim\optim
and I can open it. So I assumed it was installed. Is that wrong?
Thxs again
Jean Marc
Jean Marc 2013년 2월 28일
ah I guess the right to see doesn't give the right to use...
Thxs
If you use
which -all linprog
it will likely report "no license available"

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

질문:

2013년 2월 28일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by