Lognormal CDF plots? Can't get them to work in MATLAB.

3 views (last 30 days)
Hi all,
I'm currently trying to plot some lognormal CDF plots but I can't get them to work. Normal distribution plots work fine i.e.
for j=1:40
a3 = cdf('norm',5*1.32e-13,((j-1)*0.33e-13),3e-13);
b3(j) = 1-a3;
p(j) = ((j-1)*0.33e-13);
plot(p,b3);
end;
Works fine, but as soon as I change 'norm' to 'logn' I can't get it plot anything. I've tried logging my mu value, which gives me a very sharp profile. Do I need to change one of my variables to be logged? Or am I just misunderstanding this function?
Many thanks.

Answers (1)

the cyclist
the cyclist on 15 May 2014
I think this is primarily a problem with the domain/range of your input to cdf. For example, this code creates a sensible graph:
for j=1:40
a3 = cdf('logn',5*1.32,((j-1)*0.33),3);
b3(j) = 1-a3;
p(j) = ((j-1)*0.33);
plot(p,b3);
end

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!