title: Iteration index in a Julia for loop
body: <p>I have to code a very simple <code>for</code> loop in Julia, which I reproduce below:</p>
  
  <pre><code>result=fill([],6,1)
  E=rand(5,5)
  D=3.27
  k=2
  for s in [0.5,0.75,1,1.25,1.5,2]
      result[??]=exp.(-(E.^2/D)/(2*s*k))
  end
  </code></pre>
  
  <p>At each iteration, I want that the <code>i</code>-th element of <code>result</code> is filled with the result of the function, which uses the <code>i</code>-th element of the array <code>[0.5,0.75,1,1.25,1.5,2]</code>. So I don't know what to put inside of the brackets <code>[??]</code>. 
  So far, I tried</p>
  
  <pre><code>for (index, value) in enumerate([0.5,0.75,1,1.25,1.5,2])
         result["$index"]=exp.(-(E.^2/D)/(2* "$value" *k))
  end
  </code></pre>
  
  <p>but it doesn't work. Any hint?</p>