I want to use a vector input such of dimension [m;1] in a function that takes in m number of inputs. For example:
syms x1 x2;
f = x1^2 + x2^2;
F = matlabFunction(f);
x = [1;1];
F(x);
The above code does not work because F is a function of 2 inputs and it only sees the vector x as a single input. I know I can say F(x(1),x(2)) and the above would work but I want it to work for a function of m variables and a vector of m length.
All help is appreciated. Thanks.