Show older comments
Hi everybody. I have an array.
1) I do a histfit(data) to get a histogram representation of my data with a normal distribution curve on top. I want a 3rd thing on this graph and that is a smooth line representing the data (so I want the curve representing the distribution of my data on top of this to compare with the normal distribution)
Thanks.
Accepted Answer
More Answers (2)
Jyoti Verma
on 13 Nov 2019
0 votes
a=[4,5,1,2,2,3,4,2,2,1]
b=[4;5;1;2;2;3;4;2;2;1]
n=length(a);
RangeMax=max(a);
RangeMin=min(a);
sizehist=RangeMax-RangeMin+1;
histogram=zeros(sizehist,1);
for i=1:n
histogram(a(i))=histogram(a(i))+1;
end
bar(histogram);
pavan kumar
on 6 Aug 2021
0 votes
What is the procedure to find the Histogram coefficients?
Categories
Find more on Exploration and Visualization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!