I have always used a separate file for all my functions, but it's rather odd to have as many files as mathematical expressions in my code. So I am trying to used anonymous function, but I haven't been able to use them. Here is a simple example:
prob = @(x) a-a*exp(-x);
y = 10*prob;
What is the right way to fix such a code?