23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Warning Control<br />

warning on verbose<br />

Call the function described in Example 1 above to find out how to suppress<br />

any warnings generated by that function:<br />

f1(50,1)<br />

Warning: Log of zero.<br />

(Type "warning off <strong>MATLAB</strong>:log:logOfZero" to suppress this warning.)<br />

Use the message identifier <strong>MATLAB</strong>:log:logOfZero to disable only this<br />

warning, and then run the function again. This time the warning message<br />

is not displayed:<br />

warning off <strong>MATLAB</strong>:log:logOfZero<br />

f1(50,1)<br />

8-25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!