This commit is contained in:
2026-04-21 10:32:56 -07:00
parent fbc7fe18f4
commit c467ca35be
2 changed files with 1 additions and 30 deletions
+1 -22
View File
@@ -5,7 +5,7 @@ function f = plotParameters(obj)
arguments (Output)
f (1, 1) {mustBeA(f, "matlab.ui.Figure")};
end
% Distance and tilt sample points
d_values = [0.01, 0.1, 0.25, 0.5, 0.75, 1, 2, 3, 4, 5:5:100];
% t = zeros(size(d));
@@ -15,37 +15,16 @@ function f = plotParameters(obj)
[d_mg, t_mg] = meshgrid(d_values, t_values);
d = d_mg(:); t = t_mg(:); % flatten
% Sample RSS function by distances, tilts
r_x = obj.RSS(d', t');
% Sample SINR (SNR) function by distances, tilts
% using SINR method with no other transmitters defined is equivalent to SNR
s_x = obj.sensorPerformance(d, t); % don't define other sensors
% Plot resultant sigmoid curves
f = figure;
tiledlayout(f, 2, 1, "TileSpacing", "tight", "Padding", "compact");
% RSS/Distance with 0 tilt
nexttile(1, [1, 1]);
grid("on");
title("RSS vs Distance");
xlabel("Distance (m)");
ylabel("Tilt (deg)");
zlabel("RSS (dBm)");
hold("on");
surf(d_mg, t_mg, reshape(r_x, size(d_mg)));
hold("off");
% ylim([0, 1]);
% SNR/Distance with 0 tilt
nexttile(2, [1, 1]);
grid("on");
title("SNR vs Distance");
xlabel("Distance (m)");
ylabel("Tilt (deg)");
zlabel("SNR (dB)");
hold("on");
surf(d_mg, t_mg, reshape(s_x, size(d_mg)));
hold("off");
end