I have a rather complicated function the I would like to write as an anonymous function.
It looks something like this:
function Answer = MatlabFunction(x)
a=4*x;
b=sin(a);
c=cos(b);
Answer = c;
I don't know how to put this into an anonymous function however. Is there a way to do this without writing it as several cascading functions?