Example of Functions which complete a task:
For illustration, the function below just prints the number arguments passed to it in a sentence format:
As this function isn't computing anything, there are not any output arguments in the function header, and no =. An illustration of a call to the function is as shown below:
>> printem(3.3, 2)
The first number is 3.3 and the second is 2.0
Note that as the function is not returning any of the value, it cannot be called from an assignment statement. Any try to do this would answer in an error, for illustration,
>> x = printem(3, 5) % Error!!
??? Error using ==> printem
Too many output arguments.
We can hence, think of the call to the function which does not return values as a statement by itself, in which the function call cannot be imbedded in the other statement like an assignment statement or an output statement.