I need to pass X and Y which are 2-D meshgridded matrices into c the 3-D matrix. where k is a constant and zv is a vector.
Here is my try:
for i = 1:M c(:,:,i)=exp(1j*k/(2*zv(i))*(X2.^2+Y2.^2));end
Thanks.
for loopmesh
for i = 1:M c(:,:,i)=exp(1j*k/(2*zv(i))*(X2.^2+Y2.^2));end
Best Answer