It must end with .m . Sometimes the value is the result of a computation, sometimes it is a string like 'yes' or 'no'. There is no special keyword marking the end of a function, as there are in some other programming languages. Input and output arguments Functions can have any mix of input and output arguments. Many common, simple functions have a single input and a single output argument.
Some functions have two or more input arguments.
Write a function called counter , inside a file called counter.m . The function should take three arguments, as shown above, and it should print out numbers starting at start , increasing by increment each time, and stopping when the next value would exceed end . It's also possible for a function to have more than one output argument. Either conversion requires two input values, and two output values. The output arguments appear immediately after the keyword function , enclosed in square brackets.