Thanks Xiaoyi...That did the job ....I just downloaded "kde.m" and using it. 
Thanks! 

-------------- 
Hatef Monajemi 
PhD Student 
Environmental Fluid Mechanics and Hydrology 
Department of Civil and Environmental Engineering 
Stanford University 
473 Via Ortega, Y2E2 Bldg, Room M25 
Stanford, CA 94305 
Email: [email protected] 
Web: http://www.stanford.edu/~monajemi/ 

----- Original Message -----
From: "Xiaoyi Liu" <[email protected]> 
To: "Hatef Monajemi" <[email protected]> 
Cc: [email protected] 
Sent: Wednesday, March 9, 2011 7:55:57 PM 
Subject: Re: [Stanford-imaging] Question on Matlab 

Hi Hatef, 


I think you need to smooth the histogram with a uniform or other kernels such 
as Gaussian distribution (look up kernel density estimation). Matlab has a 
function " ksdensity " that does it, but honestly I have never used it. Or if 
you are familiar with R, you can use it too. 


Best, 
Xiaoyi 


On Wed, Mar 9, 2011 at 7:00 PM, Hatef Monajemi < [email protected] > wrote: 




Dear All, 


I have a question on Matlab and I appreciate if any of you could comment on 
this if you have prior experience in what I want. 

I have bunch of scalar data and I need to sketch the PDF of it. I am familiar 
with "hist" and "bar" functions in Matlab where basically you create some bins 
and put the data in there. However, I would want to draw only a curve that 
represent pdf and do not need the "bars"...In other words, I need to draw a 
curvilinear line that joins the top of these bars (in some sense)...Any idea on 
this would be much appreciated. any Matlab function? 

To clarify what I mean, I also attached a jpg image (I want the form on the 
left not on the right in that picture) 

Bests, 
Hatef 
-------------- 
Hatef Monajemi 
PhD Student 
Environmental Fluid Mechanics and Hydrology 
Department of Civil and Environmental Engineering 
Stanford University 
473 Via Ortega, Y2E2 Bldg, Room M25 
Stanford, CA 94305 
Email: [email protected] 
Web: http://www.stanford.edu/~monajemi/ 


-- 
Mailing list: https://launchpad.net/~stanford-imaging 
Post to : [email protected] 
Unsubscribe : https://launchpad.net/~stanford-imaging 
More help : https://help.launchpad.net/ListHelp 




-- 
Xiaoyi Liu 
Department of Civil and Environmental Engineering Stanford University 
EFML 161, Yang & Yamasaki Environment & Energy Building - 4020 
473 Via Ortega 
Stanford, CA 94305 
www.stanford.edu/~shawnliu 
-- 
Mailing list: https://launchpad.net/~stanford-imaging
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~stanford-imaging
More help   : https://help.launchpad.net/ListHelp

Reply via email to