MuPAD has Different output from regular m file

21 Views Asked by At

I'm going to plot a function in MuPAD tool in Matlab, it seems it's not correct.

my function in (MuPAD) is:

P = exp(-10)*10^n/n!
plot(P, n=0:24);

and in a regular m-file is:

n=0:24;
P = exp(-10).*(10.^n)/factorial(n);
plot(n,P);

Its result is diagonal line which is not true. However, the same function in regular m file script is plotted very well. Any idea?

0

There are 0 best solutions below