How to make a distribution from array
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hey everybody, I'm pretty new in Matlab and english is not my mother tongue, so please be very patience.
I really would like to plot and array vs his occurrences. For example, I've got this array:
T = [2,2,3,4,5,5,5,12,34,11,11]
I'd like to plot this points: A(2,2) B(3,1) C(4,1) D(5,3) E(12,1) F(34,1) G(11,2)
I don't want to make an histogram, I would like to plot points and then fit them with the best fit. How can I do?
Thank you very much.
2 commentaires
Guillaume
le 1 Août 2017
I'd like to plot these points ... I don't want to make an histogram
These points are the exact definition of an histogram.
Réponses (1)
Akira Agata
le 1 Août 2017
Plotting histogram and obtaining its bin counts are simply done by histogram and histcounts functions, respectively, like:
T = [2,2,3,4,5,5,5,12,34,11,11];
% Plot histogram
histogram(T);
% Obtain histogram bin counts
bins = histcounts(T);
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!