1 function maxerr=compareto(d1,pat)
\r
2 if ~exist('pat','var'),pat=['*_0*.txt'],end
\r
9 v=read_array_m([name]);
\r
10 v1=read_array_m([d1,'/',name]);
\r
12 sz=(max(abs(v(:)))+max(abs(v1(:))))*0.5;
\r
13 maxadiff=max(abs(vdiff));
\r
14 meandiff=mean(vdiff);
\r
16 reladiff=maxadiff/sz;
\r
18 fprintf('%s diff: max abs %g mean %g std %g max abs rel %g\n',...
\r
19 name,maxadiff,meandiff,stddiff,reladiff)
\r
21 disp(['comparison of ',name,' failed'])
\r