发布网友 发布时间:2022-05-24 17:51
共1个回答
热心网友 时间:2023-10-23 22:46
给出的线性回归模型,可以用linprog()函数来求。由于问题是关于最大值线性回归模型,但可以将最大值问题转换为最小值问题,即 max f = min -f 。
所以你的问题可按下列方法来求解。
f=-[0.4;0.28;0.32;0.72;0.64;0.6];
A=[0.01,0.01,0.01,0.03,0.03,0.03;0.02,0,0,0.05,0,0;0,0.02,0,0,0.05,0;0,0,0.03,0,0,0.08];
b=[850;700;100;900];
lb=zeros(6,1);
[x,fval,exitflag]=linprog(f,A,b,[],[],lb)
运行结果