Functions | |
if (retval!=0) if(nargin | |
if (norm_x!=0 &&norm(x-x', inf)/norm_x > tol) retval=0 | |
endif endif else | print_usage () |
endif endfunction | !assert (issymmetric(1)) |
!assert (!(issymmetric([1, 2]))) | |
!assert (!(issymmetric([]))) | |
!assert (issymmetric([1, 2;2, 1])==2) | |
!assert (!(issymmetric("test"))) | |
!assert (issymmetric([1, 2.1;2, 1.1], 0.2)==2) | |
!assert (issymmetric([1, 2i;-2i, 1])) | |
!assert (!(issymmetric("t"))) | |
!assert (!(issymmetric(["te";"et"]))) | |
!error | issymmetric ([1, 2;2, 1], 0, 0) |
!error | issymmetric () |
!assert (!(issymmetric(s))) | |
Variables | |
function | retval |
else | tol = eps |
endif endif | norm_x = norm (x, inf) |
!test!s | a = 1 |
!assert | ( | ! | issymmetric(s) | ) |
!assert | ( | ! | issymmetric(["te";"et"]) | ) |
!assert | ( | ! | issymmetric("t") | ) |
!assert | ( | issymmetric([1, 2i;-2i, 1]) | ) |
!assert | ( | issymmetric([1, 2.1;2, 1.1], 0.2) | = =2 |
) |
!assert | ( | ! | issymmetric("test") | ) |
!assert | ( | issymmetric([1, 2;2, 1]) | = =2 |
) |
!assert | ( | ! | issymmetric([]) | ) |
!assert | ( | ! | issymmetric([1, 2]) | ) |
endif endfunction !assert | ( | issymmetric(1) | ) |
if | ( | retval! | = 0 |
) |
!error issymmetric | ( | ) |
!error issymmetric | ( | 0 | , | |
0 | ||||
) |
!test ! s a = 1 |
function retval |