Functions are a fundamental part of mathematics and most students are familiar with how they work. In math class, you were likely taught that you can think of functions like little machines (figure 16.0.2) that associate a unique number \(y\text{,}\) with any given number, \(x\text{.}\) You may have even learned the terminology that the \(x\) value is the input, and the \(y\) value is the output.
If you can understand how a mathematical function works, you are actually well on your way to understanding how MATLAB functions work! MATLAB functions work in the same way as mathematical functions. You have one (or more inputs), manipulate the input(s) according to some rules, and then you return one (or more outputs).