image thumbnail
from Modified Rosin-Rammler Distribution by DS
Functions for manipulating or fitting data with the modified Rosin-Rammler distribution.

Demonstration of modified Rosin-Rammler distribution functions

Demonstration of modified Rosin-Rammler distribution functions

Modified Rosin-Rammler distribution
Y = 1-EXP(-(Ln(X)/Ln(D))^q)
The distribution is described in terms of 2 parameters, D and q:
 -  D is a representative diameter, commonly chosen such that 63.2% the
    total volume is contained in particles smaller than D.
 -  The exponent q provides a measure of the spread of drop sizes.  The
    higher the value of q, the more uniform the spray.  If q is
    infinite the drops in the spray are all the same size.  For typical
    sprays, the value of q is between 1.5 and 4.

Contents

mRosinRammlerCDF

%Modified Rosin-Rammler cummulative distribution function
%--------------------------------------------------------------------------
x = (5:.1:50);
hCDF = figure;
plot(mRosinRammlerCDF(x,4,10));
title('Modified Rosin-Rammler:  CDF');

mRosinRammlerPDF

%Modified Rosin-Rammler probability density function
%--------------------------------------------------------------------------
hPDF = figure;
plot(mRosinRammlerPDF(x,4,10));
title('Modified Rosin-Rammler:  PDF');

mRosinRammlerFit

%mRosinRammlerFit -- fit modified Rosin-Rammler function to the data
%--------------------------------------------------------------------------
%make some random data
xdata = (5:.1:50)';
X = xdata + 2 .* randn(size(xdata));
q = 4;  %these are the parameters the fit should deduce
D = 10;
ydata = (exp(-((log(X)./log(D)).^q))...
        .* q...
        .* ((log(X)./log(D)).^q))...
        .* (1./(X .* log(X)));

%run fitting procedure
[estimates, model] = mRosinRammlerFit(xdata,ydata)

%plot the results
hFitMRR = figure;
plot(xdata, ydata, '*')
hold on
[sse, FittedCurve] = model(estimates);
plot(xdata, FittedCurve, 'r')

xlabel('xdata')
ylabel('f(estimates,xdata)')
title('Modified Rosin-Rammler:  fit to random data');
legend('data', ['fit using ', func2str(model)])
hold off
estimates =

    3.9982   10.5279


model = 

    @mRosinRammlerFit/mRosinRammlerFun

mRosinRammlerSMD

%Sauter mean diameter calculation for modified Rosin-Rammler distribution
%--------------------------------------------------------------------------
%Using the estimated parameters from the fit allows us to determine SMD for
%the "measured" particle distribution.
smd = mRosinRammlerSMD(X,estimates(1),estimates(2))
smd =

   18.6089

Author's Comments

%==========================================================================
%mRosinRammlerDemo.m
%Demonstrates functions for working with the modified Rosin-Rammler dist.
%--------------------------------------------------------------------------
%author:  David Sedarsky
%date:    March, 2007
%--------------------------------------------------------------------------
%
%  These functions are pretty straightforward, and are provided primarily
%  as a simple, useful curve-fitting example.  Much of the code is adapted
%  directly from the "fitcurvedemo" detailed in the MatLab help files.
%
%==========================================================================

Contact us at files@mathworks.com