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.

5 Types of Functions<br />

Supply the value for c by constructing an anonymous function for the entire<br />

equation and you are done:<br />

g = @(c) (quad(@(x) (x.^2 + c*x + 1), 0, 1));<br />

g(2)<br />

ans =<br />

2.3333<br />

5-14

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

Saved successfully!

Ooh no, something went wrong!