0001
0002 indDb= find(abs(ar1)<1e-12*abs(ar2));
0003 if ~isempty(indDb)
0004 disp ' ';
0005 disp(['Possible numerical pb in ' sCaller ' with variable ' sVar])
0006 nbr=size(ar1,1);
0007 disp(['Pb with ' int2str(length(indDb)) ' indices. Details of first index where problem occurs:']);
0008 kk=1;
0009 disp(['Row ' int2str(mod(indDb(kk)-1,nbr)+1) ' Col ' int2str(floor((indDb(kk) -1)/ nbr)+1)]);
0010 disp(['Sum result is ' num2str(ar1(indDb(1)))]);
0011 disp(['Sum element is ' num2str(ar2(indDb(1)))]);
0012 pkey=input ('enter d for details, k for entering debug mode, or enter to continue ?','s');
0013 if (strcmpi(pkey,'d') || strcmpi(pkey,'k'))
0014 for kk=2:length(indDb)
0015 disp(['Row ' int2str(mod(indDb(kk)-1,nbr)+1) ' Col ' int2str(floor((indDb(kk) -1)/ nbr)+1)]);
0016 end
0017 if strcmpi(pkey,'k')
0018 keyboard
0019 end
0020 end
0021 disp ' ';
0022 end