In fact, I think that you mean non symmetric formula to define x
in the gauss function, but the spatial support which is obtained is symmetric.
This is due to the non-symmetric character of the floor function.
It always extracts the integer part, for instance floor(1.9) = 1
As a consequence, if you want to center the spatial support, you have to add 0.5 before applying the floor function.
We could have used the round function as well.
I encourage you to try to put these 3 lines in the gauss function (without ; at the end of the line, so it will print the values taken by x
) and to compare the results.
Code: Alles auswählen
x = [floor(-3.0*sigma + 0.5):floor(3.0*sigma + 0.5)]
x = [floor(-3.0*sigma - 0.5):floor(3.0*sigma + 0.5)]
x = [round(-3.0*sigma):round(3.0*sigma)]
Hope this is clearer !