annotate general/numerical/issym.m @ 4:e44f49929e56

Adding reorganised general toolbox, now in several subdirectories.
author samer
date Sat, 12 Jan 2013 19:21:22 +0000
parents
children
rev   line source
samer@4 1 function z=issym(x,th)
samer@4 2 % issym - Test if matrix is symmetric with optional tolerance
samer@4 3 %
samer@4 4 % issym :: [[N,N]] -> bool.
samer@4 5 % issym :: [[N,N]], nonneg -> bool.
samer@4 6
samer@4 7 if nargin<2,
samer@4 8 z=all(all(x==x'));
samer@4 9 else
samer@4 10 z=all(all(abs(x-x')<=th));
samer@4 11 end