probability1d¶
[fdensity, fdensitycumulative, bincenter, xmean, xstd] = probability1d(x, binedge, dispout)
Description¶
Calculate 1D probability density distribution for a given dataset
Inputs¶
- x
- Input data
- binedge
- Bin edgeslength(binedge)=number of bin +1If there are N bins in histogram/distribution, then values in binedge are as:1st value: left edge of 1st bin, 2nd value: left edge of 2nd bin, …(N)th value: left edge of last bin, (N+1)th value: right edge of last bin
- dispout=’no’;
- Define to display outputs or not (‘yes’: display, ‘no’: not display)
Outputs¶
- fdensity
- Probability density distribution
- fdensitycumulative
- Cumulative probability density distribution
- bincenter
- Bin center
- xmean
- Mean value of input data
- xstd
- Standard deviation of input data
Examples¶
x(:,1)=(-0.1+(0.1-(-0.1))).*randn(1024*2,1);
binedge(:,1)=linspace(min(x),max(x),11);
[fdensity,fdensitycumulative,bincenter,xmean,xstd]=probability1d(x,binedge,'yes');