Having trouble getting the plot

so I am having trouble getting this to display. I will be changing the value of big N to different values but I can't even get this to display properly. Im not sure what I am doing wrong here can anybody help
N = 1;
n = 0:1:150;
amplitude = (N.^n)*exp(-N)/(factorial(n))
plot(n,amplitude);

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 5 de Feb. de 2013
Editada: Azzi Abdelmalek el 5 de Feb. de 2013

0 votos

factorial(n) is an array then you have to use ./ instead of /
amplitude = (N.^n)*exp(-N)./(factorial(n))

La pregunta está cerrada.

Etiquetas

Preguntada:

el 5 de Feb. de 2013

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by