figure(1)
set(gcf,'Position',[0 100 660 500])
x=0:0.005:4.5;
f=zeros(7,length(x));
i=1;
s=1/4;
for u=-1/2:1/4:1
    f(i,:)=(1./(sqrt(2*pi)*s.*x)).*exp(-((log(x)-u).^2)./(2*s^2));
    i=i+1;
end

for i=1:1:size(f,1)
    plot(x,f(i,:));hold on;
end
title('density of lognormal distribution LN(u,s^2)')
l1=legend('u=-1/2','u=-1/4','u=0','u=1/4','u=1/2','u=3/4','u=1');
title(l1,'s=1/4')



figure(2)
set(gcf,'Position',[670 100 700 500])
x=0:0.005:3.5;
i=1;
u=0;
g=zeros(5,length(x));
for s=[1/4:1/4:1,2]
    g(i,:)=(1./(sqrt(2*pi)*s.*x)).*exp(-((log(x)-u).^2)./(2*s^2));
    i=i+1;
end

for i=1:1:size(g,1)
    plot(x,g(i,:));hold on;
end

title('density of lognormal distribution LN(u,s^2)')
l2=legend('s=1/4','s=1/2','s=3/4','s=1','s=2');
title(l2,'u=0')


    
    