| produce ??? Error using ==> ./ Matrix dimensions must agree. Error in ==> c:\buggy.m On line 3 ==> z = (1:n)./x; K>> and put MATLAB in debug mode. Stop if InfNaN In buggy, if any of the elements of the input x is zero, a division by zero occurs. The statements dbstop if naninf buggy(0:2) produce Warning: Divide by zero. > In c:\buggy.m at line 3 K>> and put MATLAB in debug mode. Stop at Function in File In this example, MATLAB stops at the newTemp function in the M-file yearlyAvgs: dbstop in yearlyAvgs>newTemp Stop at Non M-File In this example, MATLAB stops at the built-in function clear when you run myfile.m. dbstop in clear; myfile MATLAB issues a warning, but permits the stop: |