Abstract
MATLAB® provides an enormous library of built-in functions; however, there will be times when you cannot find a suitable function. There are two approaches to developing your own functions: anonymous functions and separate function files. Anonymous functions are one-line functions which can be incorporated into a script file and used within that script. They enable you to reuse a line of code multiple times within a script by calling the function. This makes the code easier to read and eliminates the risk of forgetting to change each occurrence of the code if you decide that it requires modification.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Webb, C.R., Domijan, M. (2019). Anonymous Functions. In: Introduction to MATLAB® for Biologists. Learning Materials in Biosciences. Springer, Cham. https://doi.org/10.1007/978-3-030-21337-4_8
Download citation
DOI: https://doi.org/10.1007/978-3-030-21337-4_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-21336-7
Online ISBN: 978-3-030-21337-4
eBook Packages: Biomedical and Life SciencesBiomedical and Life Sciences (R0)