function Ml = myseries(t)n=0;while (n<10) Ml = sum(t.^n/(gamma(n + 1))); n = n+1;end
The above code runs well as long as the input variable is a scalar; for vectorized inputs, it fails. What might be wrong?
programming
function Ml = myseries(t)n=0;while (n<10) Ml = sum(t.^n/(gamma(n + 1))); n = n+1;end
Best Answer