centralized thesis figure plotting scripts

This commit is contained in:
kdee committed 2026-10-08 23:58:09 -07:00
1 parent dd5a0fd103
commit a55798c599
4 files changed
+272 -60

No files matched your search

-25
View File
@@ -172,30 +172,5 @@ classdef test_rfSensor < matlab.unittest.TestCase
sensor2.plot(pos2(3), [pos1 - pos2; pos3 - pos2], {sensor1; sensor3});
sensor3.plot(pos3(3), [pos1 - pos3; pos2 - pos3], {sensor1; sensor2});
end
function test_thesis_antenna_patterns(tc)
f = figure;
xi = -90:0.1:90; % degrees
n = [1, 4, 16, 64, 256];
for ii = 1:length(n)
gain = 10 .* log10(2 * (n(ii) + 1)) + 10 .* n(ii) .* log10(max(0, cosd(xi)));
plot(xi, gain, "LineWidth", 2);
if ii == 1
hold("on");
end
end
hold("off");
grid("on");
ylim([-100, 35]);
xlim([-90, 90]);
xticks(-90:45:90);
% exportThesisFig switches all text to the LaTeX interpreter
title("Transmitting Antenna Gain Model");
ylabel("Transmitting Antenna Gain (dBi)");
xlabel("Elevation Angle from Antenna Boresight $\xi$ ($^\circ$)");
legend("$\delta = " + string(n) + "$");
% exportThesisFig(f, "antennapatterns", 3/4);
% close(f);
end
end
end
-24
View File
@@ -57,30 +57,6 @@ classdef test_sigmoidSensor < matlab.unittest.TestCase
% Performance at great tilt should be 0
tc.verifyEqual(tc.testClass.sensorPerformance([0, 0, h], [5, 5, 0]), 0, "AbsTol", 1e-9);
end
function test_thesis_graphic(tc)
s = [sigmoidSensor, sigmoidSensor];
alphaDist = [2, 8];
betaDist = [25, 1];
alphaTilt = [50, 15]; % degrees
betaTilt = [0.2, 3];
s(1) = s(1).initialize(alphaDist(1), betaDist(1), alphaTilt(1), betaTilt(1));
s(2) = s(2).initialize(alphaDist(2), betaDist(2), alphaTilt(2), betaTilt(2));
set(groot, 'defaultTextInterpreter', 'latex');
set(groot, 'defaultAxesTickLabelInterpreter', 'latex');
set(groot, 'defaultLegendInterpreter', 'latex');
set(groot, 'defaultColorbarTickLabelInterpreter', 'latex');
set(groot, 'defaultAxesFontSize', 10); % = \footnotesize in a 12pt doc
set(groot, 'defaultTextFontSize', 10);
% Plot
f = s(1).plotParameters;
f = s(2).plotParameters(f);
% f = exportThesisFig(f, "sigmoidmodel", 3/4);
end
end
end