Draw Pdf and Cdf for the given data
    55 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Chen Zhu
 il 5 Nov 2017
  
    
    
    
    
    Risposto: Kaushik Lakshminarasimhan
      
 il 5 Nov 2017
            I am new to MatLab. I have an array of data such as
sample1=[0.7,1.2,1.5,2.0,1.3,1.7,2.2,2.5,3.6, ....];
I want to plot the CDF and PDF of the data. Is there a easy way to do this?
Thanks!
0 Commenti
Risposta accettata
  Kaushik Lakshminarasimhan
      
 il 5 Nov 2017
        [p,x] = hist(sample1); plot(x,p/sum(p)); %PDF
[f,x] = ecdf(sample1); plot(x,f); %CDF
Ckeckout help hist to see how to control the points at which you want to compute the probability densities.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Descriptive Statistics and Visualization in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

