I am trying to define a simple function and then call it:
function p=MyExp(N);
p=[ 1 ]; % 0th order polynomial.
for k=1:N
pk=1/(factorial(k));
p=[pk,1];
end
end
poly3=MyExp(3);
disp (poly3)
MATLAB is returning a message: Error: File: matlab_labIII_3_I.m Line: 10 Column: 1 This statement is not inside any function. (It follows the END that terminates the definition of the function "MyExp".)
This script works well on OCTAVE!
Thanks
matlab_labIII_3_I.mand how does it relate toMyExp?