Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
antennaHF
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ftomi
antennaHF
Commits
5975696e
Commit
5975696e
authored
5 years ago
by
ftomi
Browse files
Options
Downloads
Patches
Plain Diff
diff plot
parent
096808c6
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
RTX class/BalazsAperture.m
+2
-1
2 additions, 1 deletion
RTX class/BalazsAperture.m
RTX class/sim_diff.m
+89
-0
89 additions, 0 deletions
RTX class/sim_diff.m
with
91 additions
and
1 deletion
RTX class/BalazsAperture.m
+
2
−
1
View file @
5975696e
...
@@ -25,7 +25,7 @@ classdef BalazsAperture < Aperture
...
@@ -25,7 +25,7 @@ classdef BalazsAperture < Aperture
end
end
end
end
function
plotApertureField
(
obj
)
function
[
x
,
y
]
=
plotApertureField
(
obj
)
histogram
=
obj
.
getCollisionHistogram
();
histogram
=
obj
.
getCollisionHistogram
();
x
=
linspace
(
-
obj
.
size
/
2
,
obj
.
size
/
2
,
length
(
histogram
));
x
=
linspace
(
-
obj
.
size
/
2
,
obj
.
size
/
2
,
length
(
histogram
));
...
@@ -48,6 +48,7 @@ classdef BalazsAperture < Aperture
...
@@ -48,6 +48,7 @@ classdef BalazsAperture < Aperture
yticks
([
-
pi
,
-
3
*
pi
/
4
,
-
pi
/
2
,
-
pi
/
4
,
0
,
pi
/
4
,
pi
/
2
,
3
*
pi
/
4
,
pi
]);
yticks
([
-
pi
,
-
3
*
pi
/
4
,
-
pi
/
2
,
-
pi
/
4
,
0
,
pi
/
4
,
pi
/
2
,
3
*
pi
/
4
,
pi
]);
yticklabels
({
'-\pi'
,
''
,
'-^{1}/_{2}\pi'
,
''
,
...
yticklabels
({
'-\pi'
,
''
,
'-^{1}/_{2}\pi'
,
''
,
...
'0'
,
''
,
'^{1}/_{2}\pi'
,
''
,
'\pi'
});
'0'
,
''
,
'^{1}/_{2}\pi'
,
''
,
'\pi'
});
y
=
histogram
;
end
end
function
directivity
=
calcDirectivity
(
obj
,
wavelength
)
function
directivity
=
calcDirectivity
(
obj
,
wavelength
)
...
...
This diff is collapsed.
Click to expand it.
RTX class/sim_diff.m
0 → 100644
+
89
−
0
View file @
5975696e
clear
close
all
reflectors
=
[
PlaneReflector
([
2
0
],
2
),
ParabolaReflector
([
0
0
],
4
,
3
)];
%reflectors = [PlaneReflector([-1 1], 0)];
aperture1
=
BalazsAperture
([
2.0001
0
],
20
,
1000
);
aperture2
=
SegmentedAperture
([
2.0001
0
],
20
);
%antenna = Antenna(Vect(1,0), [ones(1,125), zeros(1,750), ones(1,125)], zeros(1,1000));
antenna
=
Antenna
(
Vect
(
1
,
0
),
ones
(
1
,
10000
),
zeros
(
1
,
10000
));
wavelength
=
3e8
/
1e9
;
nRay
=
10000
;
nRay2
=
2000
;
rtx1
=
RTX
(
reflectors
,
aperture1
,
antenna
,
wavelength
,
nRay
);
rtx1
.
trace
();
rtx1
.
calculateFarField
();
rtx2
=
RTX
(
reflectors
,
aperture2
,
antenna
,
wavelength
,
nRay2
);
rtx2
.
trace
();
rtx2
.
calculateFarField
();
%% Plot settings
plot_width
=
1200
;
h_width
=
plot_width
*
0.55
;
height
=
400
;
file_format
=
'png'
;
save_plot
=
1
;
%% Sim_characteristics_aperture_field
[
x1
,
y1
]
=
rtx1
.
plotApertureField
();
[
x2
,
y2
]
=
rtx2
.
plotApertureField
();
close
all
;
figure
(
1
)
subplot
(
2
,
1
,
1
);
hold
on
;
plot
(
x1
,
abs
(
y1
),
'b'
,
'LineWidth'
,
1
);
plot
(
x2
,
abs
(
y2
),
'r'
,
'LineWidth'
,
1
);
hold
off
grid
on
;
xlabel
(
"r'"
);
ylabel
(
"|E(r')| [V/m]"
);
xlim
([
-
5
,
5
]);
title
(
"Cassegrain antenna megvilágítási függvénye"
);
legend
(
'1. módszer'
,
'2. módszer'
,
'Location'
,
'northeast'
,
'Orientation'
,
'vertical'
);
subplot
(
2
,
1
,
2
);
hold
on
;
plot
(
x1
,
angle
(
y1
),
'b'
,
'LineWidth'
,
1
);
plot
(
x2
,
angle
(
y2
),
'r'
,
'LineWidth'
,
1
);
hold
off
grid
on
;
xlabel
(
"r'"
);
ylabel
(
"argE(r') [rad]"
);
xlim
([
-
5
,
5
]);
ylim
([
-
pi
,
pi
]);
yticks
([
-
pi
,
-
3
*
pi
/
4
,
-
pi
/
2
,
-
pi
/
4
,
0
,
pi
/
4
,
pi
/
2
,
3
*
pi
/
4
,
pi
]);
yticklabels
({
'-\pi'
,
''
,
'-^{1}/_{2}\pi'
,
''
,
...
'0'
,
''
,
'^{1}/_{2}\pi'
,
''
,
'\pi'
});
legend
(
'1. módszer'
,
'2. módszer'
,
'Location'
,
'northeast'
,
'Orientation'
,
'vertical'
);
set
(
gcf
,
'position'
,
[
0
0
h_width
height
]);
if
save_plot
saveas
(
gcf
,
'Sim_diff_aperture_field'
,
file_format
);
end
%% Sim_characteristics_far_field
[
x1
,
y1
]
=
rtx1
.
plotFarField
();
[
x2
,
y2
]
=
rtx2
.
plotFarField
();
close
all
;
plot
(
x1
,
y1
,
'b'
,
...
x2
,
y2
,
'r'
,
'LineWidth'
,
1.5
);
grid
on
;
title
(
"Cassegrain antenna távoltere"
);
legend
(
'1. módszer'
,
'2. módszer'
,
'Location'
,
'northeast'
,
'Orientation'
,
'vertical'
);
xlabel
(
"\Theta [°]"
);
ylabel
(
"S_{rel} [dB]"
);
ylim
([
-
60
1
]);
xlim
([
-
15
15
]);
set
(
gcf
,
'position'
,
[
0
0
h_width
height
]);
if
save_plot
saveas
(
gcf
,
'Sim_diff_far_field'
,
file_format
);
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment