The types of variables that are passed to a function are not fixed. Depending upon what user
passes, the arguments can be processed. Consider the cylindrical function defined in Example 5.6,
you may pass three single numbers and you will receive three numbers as output. If you
pass three vectors, which define a set of points in the cartesian system, you will receive three
vectors as output. Since the operators .* and ./ have been used in cylindrical function, the
multiplication and division operations will be array operations and you will receive the cor-
rect answer as a set of points in the cylindrical coordinate system. Consider the following
example:
>> a = 1:5
a =
1 2 3 4 5
>> b = 2:2:10
b =
2 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.