I want to multiply every element of a 782x782 matrix with a function that depends on the two indexes of that element, I tried
MapIndexed, but I don't seem to fully understand how it works.
The function is :
f[x_, y_] := Exp[I*(2 Pi/\[Lambda]g)*zi*Sqrt[1 - (\[Lambda]g*x/(2*a*dx))^2 + (\[Lambda]g*y/(2*b*dx))^2]]
y, are the indexes of the elements, and everything else already defined constants.
That function is independent of the actual value of the matrix, I just care about how to transmit the index information.
I thought about using MapIndexed to give it the index information, but I don't seem to fully grasp how to do that. Is there another easier way, or just a correct way of doing this that you can think of?
Thanks in advance.
Edit : Sorry, 782x782, but I'm guessing your answers can be used just changing the 2x2.