Trying to produce a proper pdf, cdf and histogram from data
    4 views (last 30 days)
  
       Show older comments
    
load InsulinReadings.mat
xX2 = InsulinReadings;
xX2(xX2==0)=missing;
A2 = mean(xX2,'all',"omitnan")
B2 = median(xX2,'all',"omitnan")
C2 = max(xX2,[],'all',"omitnan")
D2 = min(xX2,[],'all', "omitnan")
histogram(xX2)
[D PD] = allfitdist(xX2,'PDF');
xlabel('Insulin');
%Now get the CDF
[D PD] = allfitdist(xX2,'CDF');
xlabel('Insulin')
Using the data presented I am trying to produce better diagrams as seen in my code
0 Comments
Answers (1)
  Benjamin Thompson
      
 on 24 Feb 2022
        You could use the Curve Fitting Tool if you have that toolbox, to find the best set of parameters for some standard type of distribution.  If you are asking about the allfitdist function, there is another post on the Community site about allfitdist being replaced by fitmethis.
See Also
Categories
				Find more on Histograms 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!

