Borrar filtros
Borrar filtros

how to plot probability density plot ?

4 visualizaciones (últimos 30 días)
SONI SONI
SONI SONI el 28 de Feb. de 2015
Comentada: Image Analyst el 19 de Ag. de 2017
I have two dimensional array 1*120, I want to make probability density plot in. how to I plot in matlab?

Respuestas (1)

Image Analyst
Image Analyst el 28 de Feb. de 2015
How about calling hist() and bar() or plot()?
data = randn(1, 120)
[counts, binCenters] = hist(data, 16)
counts = counts / sum(counts); % Normalize
bar(binCenters, counts)
grid on;
  2 comentarios
ishita agrawal
ishita agrawal el 19 de Ag. de 2017
Hey, I was looking for similar solution. It solved my problem. Thanks.
Image Analyst
Image Analyst el 19 de Ag. de 2017
You're welcome. You can vote for answers if you want to "thank" the poster with reputation points. Now, with recent releases of MATLAB, we use histcounts() or histogram() instead of hist().

Iniciar sesión para comentar.

Categorías

Más información sobre Bar Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by