Info

此问题已关闭。 请重新打开它进行编辑或回答。

Can anyone tell me how to calculate this integration using integral2? I am using the below code but not getting the desired result.That is why I want to use integral2.

1 次查看(过去 30 天)
for u = -0.55:0.011:0.55 for v =-0.55:0.011:0.55
for x = -0.055:0.011:0.055
for y = -0.055:0.011:0.055
value(x1,y1) = data_file(x1,y1)*coeff_1*exp((1i*k/(2*focal_length))*(1-(distance/focal_length))*(u^2+v^2))*exp((-1i*2*pi)*((u*x)+(v*y))/(wavelength*focal_length))*0.000121;
y1 = y1+1;
end
x1 = x1+1;
y1 = 1;
end
S_rows = sum(value,2); %Adding components of matrix "value"
S_complete = sum(S_rows);
E2(u1,v1) = S_complete;
x1 = 1;
v1 = v1 + 1;
end
u1 = u1+1;
v1 = 1;
end

回答(1 个)

Naman Chaturvedi
Naman Chaturvedi 2018-9-7
If f1 is your t_A and x,y your variables, you can use
>> F=@(x,y) f1(x,y).*exp(-i*2*pi*(x*u+y*v)/(lambda*f));
>> I=integral2(F,-inf,inf,-inf,inf);
Read integral2 for further assistance.

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by