[Index for tmp_for_tar/misc]
[Return to Master Index]
test_cfind
(tmp_for_tar/misc/test_cfind.m)
Help text
Check that cfind does what it should
Last modified: April 2001
Listing of file tmp_for_tar/misc/test_cfind.m
##
## Check that cfind does what it should
##
## Author: Etienne Grossmann <etienne@isr.ist.utl.pt>
## Last modified: April 2001
sz = floor(30*rand(1,2)+1) ;
a = randn(sz)<0 ;
f = cfind(a) ;
cnt = 1 ;
ok = 1 ;
for i = 1:sz(2),
try
if any( a(f(find(f(:,i)),i),i) != a(find(a(:,i)),i) ),
ok = 0 ;
end
catch
ok = 0 ;
end
end
if !ok
printf("not ok %i\n",cnt) ;
else
printf("ok %i\n",cnt) ;
end
cnt++ ;
Produced by oct2html on Sat Apr 28 21:14:54 2001
Cross-Directory links are: ON