Skip to content
Snippets Groups Projects
Commit 92265c42 authored by lmaresz's avatar lmaresz
Browse files

Antenna class fix

parent 5dfe37dd
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ classdef Antenna
properties
amplitude = ones(1, 1000);
phase = zeros(1, 1000);
integral;
position Vect;
end
......@@ -12,6 +13,10 @@ classdef Antenna
obj.amplitude = amplitude;
obj.phase = phase;
end
dPhi = 2 * pi / length(obj.amplitude);
for j=1:length(obj.amplitude)
obj.integral(j) = sum(amplitude(1:j)*dPhi);
end
end
function [rays, complex_amplitudes] = generate_rays(obj, phi)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment