clc;clear;
c=[-3 -2 -1]';
intcon=3; %整数变量的位置为3 如果有3个都是整数则intcon=[1,2,3]
A=ones(1,3);
b=7;
Aeq=[4,2,1];
beq=12;
LB=zeros(3,1);
UB=[Inf;Inf;1];%对于x1,x2都是非负数,而x3为0-1之间的整数即x3=0或者1
[x,fval]=intlinprog(c,intcon,A,b,Aeq,beq,LB,UB);
%错误使用 intlinprog (第 144 行)
INTLINPROG has stopped because it encountered an internal error. We are sorry for the inconvenience.
Please contact technical support for assistance with your problem, quoting the code "-1000@-1000".