Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我quadprog使用给定的功能Fmatlab 输出运行时:
quadprog
F
Warning: Your Hessian is not symmetric. Resetting H=(H+H')/2.
但是,检查功能和转置之间的区别:
>> max(max(abs(F-F'))) ans = (1,1) 7.1054e-015
表明它们实际上是相同的。quadprog即使函数因机器错误而接近对称,是否也会输出此警告?
用于在 quadprog 源中存在反对称的测试是
norm(H-H',inf) > eps
即它检查无穷范数是否大于机器ε。自从
7.1054e-15 > eps = 2.22e-16
您的 Hessian 显示为非对称。