Mercurial > hg > ishara
annotate general/numerical/matrix/issym.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | db7f4afd27c5 |
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 |