Functions
Programs that accept inputs and return outputs
Both scripts and functions allow you to reuse sequences of commands by storing them in program files. Functions provide more flexibility, primarily because you can pass input values and return output values. In addition, functions avoid storing temporary variables in the base workspace and can run faster than scripts. For more information, see Create Functions in Files.
Categories
- Function Creation
Create functions, including anonymous, local, and nested functions
- Argument Definitions
Accept a variable number of inputs or outputs, check for valid values
- Scope Variables and Generate Names
Share data between functions or workspaces, generate valid variable names
- Error Handling
Generate, catch, and respond to warnings and errors