I have some parameters for some data and I am plotting a size distribution function. The probability function I am using is given below:
Currently I have the following code which plots the function:
mu = 0.015;
sigma = 1.6;
Ntot = 850;
nbins = 200;
rMin = (mu/(10*sigma));
rMax = (mu*10*sigma);
rs = logspace(log10(rMin),log10(rMax),nbins+1);
for i = 1:length(rs)
sizedist = Ntot/((sqrt(2*pi))*log(sigma))*exp(-(log(rs./mu).^2)./(2*log(sigma^2)));
xlabel('Particle Radius, \mum');
ylabel('Number Concentration, cm^3');
The first problem I have occurs here. Shouldn't the area under the curve be equal to the total number concentration specified? As this doesn't seem to be the case.
For the model I am coding it is necessary for the aerosol population to be discretised into bins.
Now suppose I wish to discretise this function into bins, currently the vector rs is the bin edges. I would like to know how to find the number concentration in each bin, but as stated above the area under the curve doesn't seem to equal Ntot. Can anyone see whether i'm doing anything wrong?
What I would like to do is to determine the Number Concentration in each bin, which when added together should total the value of Ntot.
Hopefully someone can help!!!