# Evaluating explicitly the kernel for a Gaussian/Normal distribution

**URL:** <https://discourse.julialang.org/t/evaluating-explicitly-the-kernel-for-a-gaussian-normal-distribution/2632>\
**Category:** Statistics\
**Tags:** question\
**Created:** [March 13, 2017, 4:39am UTC](https://discourse.julialang.org/t/evaluating-explicitly-the-kernel-for-a-gaussian-normal-distribution/2632 "2017-03-13T04:39:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernal](https://avatars.discourse-cdn.com/v4/letter/b/77aa72/32.png) [@Bernal](https://discourse.julialang.org/u/Bernal)\
**Post date:** [March 13, 2017, 4:39am UTC](https://discourse.julialang.org/t/evaluating-explicitly-the-kernel-for-a-gaussian-normal-distribution/2632/1 "2017-03-13T04:39:09Z")

</div>

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:

```julia
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

---

<div class="post-metadata">

**Author:** ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)\
**Post date:** [March 13, 2017, 9:02am UTC](https://discourse.julialang.org/t/evaluating-explicitly-the-kernel-for-a-gaussian-normal-distribution/2632/2 "2017-03-13T09:02:46Z")

</div>

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