Histogram part of data in matrix
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponse acceptée
Image Analyst
le 14 Mar 2012
Try this:
m = 10*rand(100,1);
[counts, bins] = hist(m(m>3), 50);
bar(bins, counts);
xlim([0 10]);
grid on;
3 commentaires
Image Analyst
le 15 Mar 2012
You can use a line plot with plot() instead of bars with bar() if you want.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Distribution Plots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!