15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

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.

Plotting Mathematical Functions<br />

100<br />

80<br />

60<br />

40<br />

20<br />

0<br />

−20<br />

−5 0 5<br />

Note that the anonymous function<br />

fh = @(x)[2*sin(x+3), humps(x)];<br />

evaluates to a matrix <strong>of</strong> two columns, one for each function, when x is a column<br />

vector.<br />

fh([1;2;3])<br />

returns<br />

-1.5136 16.0000<br />

-1.9178 -4.8552<br />

-0.5588 -5.6383<br />

4-7

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

Saved successfully!

Ooh no, something went wrong!