Chapter 5: Extensions: Write Your Own Octave Functions
Understanding functions
1 |
a) Missing function keyword |
b) Missing commas in the argument list | |
e) The second output is undefined |
f) The output variable not defined. | ||
Note that in d) the help text is misplaced | |||
2 |
Number of input arguments, (Number of ARGuments IN) | ||
Number of output arguments (Number of ARGuments OUT) |
Implementing mathematical functions as Octave functions
a)
|
b)
|
c)
|
d)
|
Notice that the functions are vectorized |
Understanding vectorization
a) |
b) |
c) |
d)
|