- #1
daher
- 2
- 0
Hi All
I am new with Matlab
I am trying to write a function on an M-file; here is the script:
function f = ali(x)
f = - x(1) * x(2);
A = [-1 -2 -2; 1 2 2]
b = [0; 72]
x0 = [10; 10; 10];
[x,fval] = fmincon(@ali,x0,A,b)
Whenever i run it i get the following message;
input argument "x" is undefined
So can anybody help
Best Regards
I am new with Matlab
I am trying to write a function on an M-file; here is the script:
function f = ali(x)
f = - x(1) * x(2);
A = [-1 -2 -2; 1 2 2]
b = [0; 72]
x0 = [10; 10; 10];
[x,fval] = fmincon(@ali,x0,A,b)
Whenever i run it i get the following message;
input argument "x" is undefined
So can anybody help
Best Regards