using Plots
Δt=0.0001;Δz=0.0001; m=100; l=100
t=zeros(l);z=zeros(l);θ=zeros(l,l)
z[1]=0;z[l]=1;θ[1,l]=0;θ[l,1]=1; θ[:,end]=θ[:,end-1]
p=plot();
for i in 2:l-1 ,n in 2:l-1
z[i]=i*Δz
f=1/(z[i]-1)
θ[n,i]=round(θ[n+1,i]*(1+2*Δt/((Δz)^2)-f*m*Δt) + θ[n+1,i-1]*(((Δt*f)/2Δz)-(Δt/(Δz)^2)) -θ[n+1,i-1]*(((Δt*f)/2Δz)+(Δt/(Δz)^2)), digits=4)
plot(θ[50,:] ,seriestype=:scatter)
#print(f)
end
current()
My plot is not as smooth as it should be. it should look like bell shape. plot is also changing on running code again.