Why am I unable to pass a vector as an input to an inline object within MATLAB?
I am trying to create an inline object that will take a vector as inputs, and use the elements of the vector as variables in the equation. For example,
f = inline('[2*sin(x) tan(x)*cos(y)]', '[x y]')
However, when I try to pass a vector as input to the object, I receive an error:
f([pi/2 pi/2])
??? Error: Only functions can return multiple values.
How can I pass a single variable as an input to the inline object?
Best Answer