Try this...
x = [0,240,480];
y = [1200,0,0];
Fcn_AddThings = str2func('@(x,y) x.^2 - 2*y');
Fcn_AddThings(x, y)
Fcn_AddThings(x(1), y(1))
Looking at your example, you can replace str2fun for input - see the image below.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!