Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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 Ansicht (letzte 30 Tage)
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

Antworten (1)

Naman Chaturvedi
Naman Chaturvedi am 7 Sep. 2018
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.

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by