Skip to main content

Chapter 5 User-defined functions

In addition to the functions built into Matlab, one can define new ones. There are two ways to introduce new functions: “anonymous functions” and “named functions”. The use of anonymous functions is similar to mathematical functions like log. The use of named functions has more to do with program structure than with mathematics.