matlabFunction() is a function that can convert symbolic to anonymous function. But how to specify what input arguments to be appeared on the anonymous function?
For example,
x = sym('x', [3, 1])
func = matlabFunction(x)
It returns a handle with:
func =
function_handle with value:
@(x1,x2,x3)[x1;x2;x3]
But how to make this to be returned:?
@(x) [x(1); x(2); x(3)]
that the whole x is the input arguments, not every element of it. This could be extremely useful when x has very long colums.
xcan be used as an input to the anonymous function@(x1,x2,x3,..). will that be acceptable?xhas 100 elements, it would be a disater to write down them all.