8.4. Function Subprograms

A large and complex task can be easily executed if divided into smaller sub-tasks or modules. Function subprograms are program segments that are written for implementing a sub-task or a module or a sub-module. These subprograms are developed separately and can be executed independently. These can also be used by other programs. Functions subprograms can be written for the common tasks that are frequently required by many users so that the users do not need to waste time writing code for the common tasks. All users can simply use the functions in their programs. MATLAB also has in its store numerous function subprograms for common tasks related to many fields such as mathematical functions, matrices, graphs, solving ...

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.