Evaluating explicitly the kernel for a Gaussian/Normal distribution

Hi folks,

probably I’m attempting to discover “how to boil water” however I have faced some weird problems building a vector of values
matching a Gaussian bell (I do NOT want to create a random variables vector that is normally distributed or go into invoking Distributions package, i.e. it is merely a Gaussian bell plotted for symmetric predefined values).
and using the following code I get an asymptote:

for i = 1 : 600
        dist[i] = (100*sqrt((i-300)^2)/(band^2));
        Amp[i] = 1./(2^(dist[i]));
        lamb[i] = v0/i;
        kx[i]=v0/(2*pi*i);
        kz[i]=v0/(2*pi*i);    
end

Is Julia perhaps willing to sort my output first?
Or is that due to incorrect syntax? I tried the code in MatLab and it runs.

Regards
Bernal

Please post a fully reproducible example and copy the actual errors you get.

2 Likes