I need a formula which will fill an array of X slots with values (from $0$ to $1$). The sum of all array values should be $1$. The values should look like this:
^ | | | 0.2 | | | ..... | .. .. | . . | . . | . . |. . |. . +------------------------array-slot->
Which means that for an array of size 7 I'd approximatelly want something like:
i[0]=0.09 i[1]=0.14 i[2]=0.17 i[3]=0.20 i[4]=0.17 i[5]=0.14 i[6]=0.09
which add to exactly $1$ and look like gaussian (or something).
Accuracy is not very important but I'd like it to sum to $1$ and not look linear.
thanks