你调用的有问题<BR>Solve a linear programming problem where f, x, b, beq, lb, and ub are vectors and <STRONG><FONT color=#b32bd5>A and Aeq are matrices</FONT></STRONG>. Syntaxx = linprog(f,A,b,Aeq,beq)<BR>x = linprog(f,A,b,Aeq,beq,lb,ub)<BR>x = linprog(f,A,b,Aeq,beq,lb,ub,x0)<BR>x = linprog(f,A,b,Aeq,beq,lb,ub,x0,options)<BR>[x,fval] = linprog(...)<BR>[x,fval,exitflag] = linprog(...)<BR>[x,fval,exitflag,output] = linprog(...)<BR>[x,fval,exitflag,output,lambda] = linprog(...)<BR><BR>里面 A和Aeq是矩阵,也就是你的lb应该和Aeq大小相等。<BR>还有自己定义参数,最好不要和程序给定同名,容易混淆 |