issymmetric.m
来自「国外专家做的求解LMI鲁棒控制的工具箱,可以相对高效的解决LMI问题」· M 代码 · 共 17 行
M
17 行
function issym=issymmetric(X)
%ISSYMMETRIC Check if variable is symmetric
% Author Johan L鰂berg
% $Id: issymmetric.m,v 1.4 2005/04/14 10:27:09 joloef Exp $
n = X.n;
m = X.m;
if (n==m)
% What are the linar indicies to the transposed matrices
ind = reshape(reshape(1:n^2,n,n)',n^2,1);
issym = norm(X.basis-X.basis(ind,:),1)<1e-10;
else
issym = 0;
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?