CHAPTER 6

image

Functions

6.1 Custom Defined Functions

We already know that MATLAB has a wide variety of functions that can be used in everyday work with the program. But, in addition, MATLAB also offers the possibility of custom defined functions. The most common way to define a function is to write its definition to a text file, called an M-file, which will be permanent and will therefore enable the function to be used whenever required.

The second way to define a function is to use the relation between MATLAB and Maple, provided you have the symbolic math Toolbox installed. In this case, functions of a variable can also be directly defined.

6.2 Functions ...

Get MATLAB Numerical Calculations now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.