Borrar filtros
Borrar filtros

Histogram part of data in matrix

1 visualización (últimos 30 días)
KaMu
KaMu el 14 de Mzo. de 2012
Hello, I would like to see a histogram of a data that stored in 2d matrix that is >0.1. how can I do that? For example in matrix A=[1,2,3;4,5,6]. I want to histogram only data >3. any help will be appreciated.

Respuesta aceptada

Image Analyst
Image Analyst el 14 de Mzo. de 2012
Try this:
m = 10*rand(100,1);
[counts, bins] = hist(m(m>3), 50);
bar(bins, counts);
xlim([0 10]);
grid on;
  3 comentarios
Image Analyst
Image Analyst el 15 de Mzo. de 2012
You can use a line plot with plot() instead of bars with bar() if you want.
KaMu
KaMu el 16 de Mzo. de 2012
Thanks .

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by