Hi,
I'm trying to write a function that is gets two arrays and the name of another function as arguements.
e.g.
main.m:
x=[0 0.2 0.4 0.6 0.8 1.0];
y=[0 0.2 0.4 0.6 0.8 1.0];
func2(x,y,'func2eq')
func 2.m :
function t =func2(x, y, z, 'func') //"unexpected matlab expression" error message here
t= func(x,y,z);
func2eq.m:
function z= func2eq(x,y)
z= x + sin(pi * x)* exp(y);
Matlab tells gives me the above error message. I've never passed a function name as an arguement before. Where am I going wrong?