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 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.