I have a loop, in each iteration I want to compute $f(X)$ such that $X$ is a vector.
When I wrote f=@(x,y) (x+2)^2+(y-x)^3 and X=[1,5],
I have an error in f(X).
How can write function $f(X)$ such that $X$ can be a vector?
And suppose we can't use f(X(1),X(2)).
Thanks
Instead of
you might try using