Plotting normal distribution with negative x range
Mostrar comentarios más antiguos
When plotting a normal distribution using the pdf command, setting the x-value range to negative values seems to give me a wrong answer. Quite likely this is me misunderstanding the command but any help would be appreciated.
I obtain the parameters using the code:
fit_parameters = fitdist(double(data_to_fit(:)),'Normal');
I then try plot it as follows:
plot(pdf(fit_parameters,x_values)
Considering that the mean is just below 0, I've set my x-values to something like -80:80. What I get, however, is a curve centred at 80 which is obviously wrong.
I am using MatLab 2013
Thanks, Y
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Exploration and Visualization en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!