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 ...
Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] 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.