Skip to content
Snippets Groups Projects
Commit 447fe793 authored by lmaresz's avatar lmaresz
Browse files

BeamWidth

parent a9cf7250
Branches
Tags
No related merge requests found
...@@ -31,6 +31,7 @@ classdef FarField < handle ...@@ -31,6 +31,7 @@ classdef FarField < handle
c1 = (obj.aperture.size/(2*nr))*2*pi/obj.nFi; c1 = (obj.aperture.size/(2*nr))*2*pi/obj.nFi;
c2 = 1i*2*pi/obj.wavelength; c2 = 1i*2*pi/obj.wavelength;
for i = 1:nTheta for i = 1:nTheta
if getappdata(progressBar2,'canceling') if getappdata(progressBar2,'canceling')
break; break;
...@@ -48,6 +49,10 @@ classdef FarField < handle ...@@ -48,6 +49,10 @@ classdef FarField < handle
end end
end end
end end
R = 2*obj.aperture.size^2/obj.wavelength;
field = field * (exp(-1i*2*pi*R/obj.wavelength)/obj.wavelength/R);
obj.field = field; obj.field = field;
delete(progressBar2) delete(progressBar2)
end end
...@@ -58,11 +63,22 @@ classdef FarField < handle ...@@ -58,11 +63,22 @@ classdef FarField < handle
end end
figure; figure;
y = abs(obj.field); y = abs(obj.field);
y = y/max(y); %y = y/max(y);
plot(obj.theta*180/pi, 20*log10(y)); plot(obj.theta*180/pi, 20*log10(y));
title("Távoltér"); title("Távoltér");
xlabel("\Theta [°]"); xlabel("\Theta [°]");
ylabel("S [dB]"); ylabel("S [dB]");
end end
function beamWidth = getBeamWidth(obj)
if isempty(obj.field)
obj.calculate();
end
normField = abs(obj.field)/max(abs(obj.field));
maxIndex = find(normField == 1, 1);
localMins = islocalmin(normField);
localMinIndexes = find(localMins == 1);
beamWidth = (min(abs(localMinIndexes - maxIndex))+1)*(obj.theta(2)-obj.theta(1))*2
end
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment