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 日間)
Dhananjay Mishra
Dhananjay Mishra 2018 年 9 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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