DistributionFit
function [pdffit,offset,A,B,resnorm,h] = distributionfit(data,distribution,nbins)
PURPOSE jdc rev. 06-jun-05
Fit one of three probability distributions (normal, lognormal, weibull) to input data vector. If the distribution is specified as 'best' the distribution that best fits the data is selected automatically.
INPUT
If nargin==1, "distribution" is prompted for and entered interactively
data - n x 1 or 1 x n input data vector
distribution - probability distribution to fit to "data". Can be 'normal', 'lognormal', 'weibull', or 'best' ... default: 'best'
nbins - number of bar-chart bins ......................... default: sqrt(length(data))
%OUTPUT
pdffit - fitted probability density function - n x 2 matrix with column 1 the x-values, column 2 the y values
offset -