Plot 2 vectors (different size) on same histogram normalized such that both have total area 1
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi
ok so i have vector A and vector B
and i want to plot them both in histogram - with normalization probabillity for each,
this is a code i tried: i have [A] vector and [B] (different sizes)
figure(1)
histogram(A,100, 'Normalization','probability')
hold on
histogram(B,100, 'Normalization','probability');
ylabel('Probabillity'); xlabel('V');
But somhow they dont get same area under the histograms plots:
or it seems like this - maybe since one vector is more "dense" (longer) how to fix it so it will look the same area below (to be equal 1 surely)
Best,
Lital
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Histograms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!