该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
[H,m]=solutionH(address); % H为5*5的矩阵,m=5
C=zeros(m,1);
lb=zeros(m,1);
Aeq=ones(1,m);
beq=1;
K=quadprog(H,C,[],[],Aeq,beq,lb);
运行到最后一行的时候提示
Warning: Trust-region-reflective algorithm does not solve this
type of problem, using active-set algorithm. For more help,
see Choosing the Algorithm in the documentation.
> In quadprog at 368
In solutionK at 10
Warning: Your current settings will run a different algorithm
(interior-point-convex) in a future release.
> In quadprog at 372
In solutionK at 10
然后我把matlab的代码改为
[H,m]=solutionH(address);
C=zeros(m,1);
lb=zeros(m,1);
Aeq=ones(1,m);
beq=1;
options = optimset(trust-region-reflective,active-set);
K=quadprog(H,C,[],[],Aeq,beq,lb,[],[],options);
结果又提示
Error using trust (line 27)
Not enough input arguments.
Error in solutionK (line 10)
options = optimset(trust-region-reflective,active-set)
我就没招了,难道是optimset函数的用法有问题?我是按照help里的弄的啊。
请教大神指导,非常感谢!