约束M是半正定的code

来源:互联网 发布:生死狙击改枪软件 编辑:程序博客网 时间:2024/04/18 15:19
function posM=PosCone(M)
[V D]=eig(M);
D=max(D,0);
posM=V*D*inv(V);
end
0 0
原创粉丝点击