images

14.1    Derivatives

14.2    Integration

14.3    Zeros of a function of one variable

14.4    Function minimization

14.5    Solving ordinary differential equations

14.6    Eigenvalues and eigenvectors

We’ve already seen how a physical model, like ballistic motion (page 106) or simple harmonic motion (page 109), can be transformed into a mathematical model, such as coupled differential equations, that can in turn be expressed as a computational model, and become the basis for a GUI tool. The purpose of the tool is to gain insight into the behavior of the model and, finally, of the actual physical system. In this chapter we point to several mathematical techniques that may prove useful in constructing computational models of various systems.

This chapter has the character of a reference section to which one can turn for pointers on MATLAB capabilities. It is not meant to be comprehensive; as always, more detail is available in the online documentation. The following topics are covered:

Derivatives Given a mathematical function realized as a MATLAB function, or a tabulated set of function values, approximate derivatives of the function can be calculated. The key MATLAB command, gradient, is described in Section 14.1.

Integration Given a mathematical function realized as a MATLAB function, or a tabulated set of function values, approximations for the definite integral of the function ...

Get Learning to Program with MATLAB: Building GUI Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.