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.

Special Values<br />

Special Values<br />

Several functions return important special values that you can use in your<br />

M-files.<br />

Function<br />

ans<br />

eps<br />

intmax<br />

intmin<br />

realmax<br />

realmin<br />

Return Value<br />

pi 3.1415926535897...<br />

i, j Imaginary unit.<br />

inf<br />

NaN<br />

computer<br />

version<br />

Most recent answer (variable). If you do not assign<br />

an output variabletoanexpression,<strong>MATLAB</strong><br />

automatically stores the result in ans.<br />

Floating-point relative accuracy. This is the<br />

tolerance <strong>MATLAB</strong> uses in its calculations.<br />

Largest 8-, 16-, 32-, or 64-bit integer your computer<br />

can represent.<br />

Smallest 8-, 16-, 32-, or 64-bit integer your<br />

computer can represent.<br />

Largest floating-point number your computer can<br />

represent.<br />

Smallest positive floating-point number your<br />

computer can represent.<br />

Infinity. Calculations like n/0, wheren is any<br />

nonzero real value, result in inf.<br />

Not a Number, an invalid numeric value.<br />

Expressions like 0/0 and inf/inf result in a NaN,<br />

as do arithmetic operations involving a NaN. Also, if<br />

n is complex with a zero real part, then n/0 returns<br />

avaluewith a NaN real part.<br />

Computer type.<br />

<strong>MATLAB</strong> version string.<br />

3-15

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

Saved successfully!

Ooh no, something went wrong!