How to make a distribution from array
이전 댓글 표시
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
Guillaume
2017년 8월 1일
I'd like to plot these points ... I don't want to make an histogram
These points are the exact definition of an histogram.
답변 (1개)
Akira Agata
2017년 8월 1일
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);
카테고리
도움말 센터 및 File Exchange에서 Exploration and Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!