First approach with MILP and intlinprog in R2015a.
I keep having the same error. Here it is an example:
intcon=2;
f=[100;70];
Aeq = [1,1];
beq = 1;
lb = zeros(2,1);
ub = lb+1;
x = intlinprog(f,intcon,Aeq,beq,lb,ub)
The error given is:
Error using intlinprog (line 121)
The number of columns in Aeq must be the same as the number of elements of f.
Error in patient2milp (line 26)
x = intlinprog(f,intcon,Aeq,beq,lb,ub)
What should I change?
Thank you and sorry if it is a silly question!

 Accepted Answer

Torsten
Torsten on 8 Mar 2016
x = intlinprog(f,intcon,[],[],Aeq,beq,lb,ub);
Best wishes
Torsten.

More Answers (0)

Categories

Tags

Asked:

on 7 Mar 2016

Commented:

on 8 Mar 2016

Community Treasure Hunt

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

Start Hunting!