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
514ca92c
Commit
514ca92c
authored
5 years ago
by
ftomi
Browse files
Options
Downloads
Patches
Plain Diff
plot fixes
parent
239f618b
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
RTX class/BalazsAperture.m
+3
-0
3 additions, 0 deletions
RTX class/BalazsAperture.m
RTX class/FarField.m
+2
-1
2 additions, 1 deletion
RTX class/FarField.m
RTX class/SegmentedAperture.m
+11
-4
11 additions, 4 deletions
RTX class/SegmentedAperture.m
RTX class/rtx_test.m
+6
-6
6 additions, 6 deletions
RTX class/rtx_test.m
with
22 additions
and
11 deletions
RTX class/BalazsAperture.m
+
3
−
0
View file @
514ca92c
...
@@ -29,7 +29,10 @@ classdef BalazsAperture < Aperture
...
@@ -29,7 +29,10 @@ classdef BalazsAperture < Aperture
histogram =
obj.getCollisionHistogram();
histogram =
obj.getCollisionHistogram();
figure
;
figure
;
x =
linspace(-obj.size/2,
obj.size
/2,
length
(
histogram
));
x =
linspace(-obj.size/2,
obj.size
/2,
length
(
histogram
));
subplot
(2,1,1);
plot
(
x
,
abs
(
histogram
));
plot
(
x
,
abs
(
histogram
));
subplot
(2,1,2);
plot
(
x
,
angle
(
histogram
));
title
("
Apertúrán
áthaladó
sugarak
eloszlása
");
title
("
Apertúrán
áthaladó
sugarak
eloszlása
");
xlabel
("
Pozíció
");
xlabel
("
Pozíció
");
ylabel
("
Sugarak
száma
");
ylabel
("
Sugarak
száma
");
...
...
This diff is collapsed.
Click to expand it.
RTX class/FarField.m
+
2
−
1
View file @
514ca92c
...
@@ -84,11 +84,12 @@ classdef FarField < handle
...
@@ -84,11 +84,12 @@ 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]");
ylim([-40 0]);
end
end
function beamWidth = getBeamWidth(obj)
function beamWidth = getBeamWidth(obj)
...
...
This diff is collapsed.
Click to expand it.
RTX class/SegmentedAperture.m
+
11
−
4
View file @
514ca92c
...
@@ -18,7 +18,7 @@ classdef SegmentedAperture < Aperture
...
@@ -18,7 +18,7 @@ classdef SegmentedAperture < Aperture
if
length
(
trace
.
rays
)
==
length
(
obj
.
prevTrace
.
rays
)
if
length
(
trace
.
rays
)
==
length
(
obj
.
prevTrace
.
rays
)
segmentSize
=
abs
(
obj
.
prevCol
.
pos
.
y
-
col
.
pos
.
y
);
segmentSize
=
abs
(
obj
.
prevCol
.
pos
.
y
-
col
.
pos
.
y
);
obj
.
segments
.
add
(
Segment
(
obj
.
prevCol
.
pos
.
y
,
col
.
pos
.
y
,
...
obj
.
segments
.
add
(
Segment
(
obj
.
prevCol
.
pos
.
y
,
col
.
pos
.
y
,
...
trace.complexAmplitude/segmentSize * exp(1i*mod(trace.length, trace.wavelength))));
trace
.
complexAmplitude
/
segmentSize
*
exp
(
1
i
*
2
*
pi
*
mod
(
trace
.
length
,
trace
.
wavelength
)
/
trace
.
wavelength
)));
end
end
end
end
obj
.
prevTrace
=
trace
;
obj
.
prevTrace
=
trace
;
...
@@ -37,9 +37,16 @@ classdef SegmentedAperture < Aperture
...
@@ -37,9 +37,16 @@ classdef SegmentedAperture < Aperture
[
histogram
,
x1
,
x2
]
=
obj
.
getCollisionHistogram
();
[
histogram
,
x1
,
x2
]
=
obj
.
getCollisionHistogram
();
plot
(
0
,
0
);
plot
(
0
,
0
);
hold
on
;
hold
on
;
for k = 1:length(histogram)
% for k = 1:length(histogram)
plot([x1(k) x2(k)], [abs(histogram(k)), abs(histogram(k))],'b');
% plot([x1(k) x2(k)], [abs(histogram(k)), abs(histogram(k))],'b');
end
% end
x
=
[
x1
;
x2
];
h
=
[
histogram
;
histogram
];
subplot
(
2
,
1
,
1
);
plot
(
x
(:),
abs
(
h
(:)));
subplot
(
2
,
1
,
2
);
plot
(
x
(:),
angle
(
h
(:)));
%plot(x(:), h(:), 'b');
hold
off
;
hold
off
;
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
RTX class/rtx_test.m
+
6
−
6
View file @
514ca92c
%
clear
clear
%
close all
close
all
reflectors
=
[
PlaneReflector
([
2
0
],
2
),
ParabolaReflector
([
0
0
],
4
,
3
)];
reflectors
=
[
PlaneReflector
([
2
0
],
2
),
ParabolaReflector
([
0
0
],
4
,
3
)];
%reflectors = [PlaneReflector([-1 1], 0)];
%reflectors = [PlaneReflector([-1 1], 0)];
aperture
=
BalazsAperture
([
3
0
],
20
,
4
00
);
aperture
=
BalazsAperture
([
3
0
],
20
,
10
00
);
aperture2
=
SegmentedAperture
([
3
0
],
20
);
aperture2
=
SegmentedAperture
([
3
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
,
125
0
),
zeros
(
1
,
750
0
),
ones
(
1
,
125
0
)],
zeros
(
1
,
1000
0
));
%antenna = Antenna(Vect(1,0));
%
antenna = Antenna(Vect(1,0)
, ones(1,10000), zeros(1,10000)
);
wavelength
=
3e8
/
1e9
;
wavelength
=
3e8
/
1e9
;
nRay
=
10000
;
nRay
=
10000
;
nRay2
=
1
000
;
nRay2
=
2
000
;
rtx
=
RTX
(
reflectors
,
aperture
,
antenna
,
wavelength
,
nRay
);
rtx
=
RTX
(
reflectors
,
aperture
,
antenna
,
wavelength
,
nRay
);
rtx
.
trace
();
rtx
.
trace
();
...
...
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