O'Reilly logo

MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] by Manoj Kumar Sharma, Ashok Kumar Goel, Raj Kumar Bansal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.6. Types of Functions

Functions can be classified into different categories based on their features and the manner in which they are applied. Some of them are as follows:

8.6.1. Subfunctions

Function files can contain code for more than one function. The first function in the file is called primary function. The primary function is called by the name of the function M-file. Additional functions defined within the same file are called subfunctions. These functions are visible only to the primary function or other subfunctions defined in the same M-file. Each subfunction begins with its function definition line. These subfunctions follow each other and may occur in any order, as long ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required