Technique to Equalize Histogram Bin size and Ks De

2019-08-19 13:21发布

问题:

I have also asked the query few days before because the clarification was vague so that's why I am uploading a query with updated views.Link is as follows. Updated :Technique used to control Step sizes (Quantization levels) of signals

I am explaining example data here because it is not possible for me to mention my original data.

I have plotted a histogram curve along with ks density.

I have placed bin size =10 and bandwidth of ks Density curve to be 0.08.

Actually I want to analyze the values based on data from Histfit (by applying 3 modal technique.) and Ks density curve.

Example Code:

 x = rand([1 50])
 figure(1)
 histfit(x,10)
 hold on 
 % [f,xi] = ksdensity(x);
 [f,xi,bw] = ksdensity(x,'width',0.08);
 plot(xi,f);
 hold off

Question:

Is it possible that I make the bin size and Bandwidth of Ks density curve same to visualize the results on same standards?

In simple words is bin size 10 equals to 0.08 bandwidth from Ks density curve.

Or how to make bin size and bandwidth equal to visualize the results on same standards.