source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/@ncvar/issymmetric.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 461 bytes
Line 
1function issym=issymmetric(X)
2%ISSYMMETRIC Check if variable is symmetric
3
4% Author Johan Löfberg
5% $Id: issymmetric.m,v 1.1 2006/08/10 18:00:21 joloef Exp $ 
6
7n = X.dim(1);
8m = X.dim(2);
9if (n==m)
10    % What are the linar indicies to the transposed matrices
11    if isa(X.basis,'lazybasis')
12        issym = 1;
13    else
14        ind = reshape(reshape(1:n^2,n,n)',n^2,1);
15        issym = norm(X.basis-X.basis(ind,:),1)<1e-10;   
16    end
17else
18    issym = 0;
19end
20
Note: See TracBrowser for help on using the repository browser.