cleanup
This commit is contained in:
@@ -15,37 +15,16 @@ function f = plotParameters(obj)
|
|||||||
[d_mg, t_mg] = meshgrid(d_values, t_values);
|
[d_mg, t_mg] = meshgrid(d_values, t_values);
|
||||||
d = d_mg(:); t = t_mg(:); % flatten
|
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
|
% Sample SINR (SNR) function by distances, tilts
|
||||||
% using SINR method with no other transmitters defined is equivalent to SNR
|
% using SINR method with no other transmitters defined is equivalent to SNR
|
||||||
s_x = obj.sensorPerformance(d, t); % don't define other sensors
|
s_x = obj.sensorPerformance(d, t); % don't define other sensors
|
||||||
|
|
||||||
% Plot resultant sigmoid curves
|
% Plot resultant sigmoid curves
|
||||||
f = figure;
|
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");
|
grid("on");
|
||||||
title("SNR vs Distance");
|
title("SNR vs Distance");
|
||||||
xlabel("Distance (m)");
|
xlabel("Distance (m)");
|
||||||
ylabel("Tilt (deg)");
|
ylabel("Tilt (deg)");
|
||||||
zlabel("SNR (dB)");
|
zlabel("SNR (dB)");
|
||||||
hold("on");
|
|
||||||
surf(d_mg, t_mg, reshape(s_x, size(d_mg)));
|
surf(d_mg, t_mg, reshape(s_x, size(d_mg)));
|
||||||
hold("off");
|
|
||||||
end
|
end
|
||||||
@@ -22,13 +22,5 @@ classdef test_rfSensor < matlab.unittest.TestCase
|
|||||||
|
|
||||||
tc.testClass.plotParameters();
|
tc.testClass.plotParameters();
|
||||||
end
|
end
|
||||||
function plot_SINR(tc)
|
|
||||||
% Plot sensor performance with a single source of interference
|
|
||||||
P_TX = 1e-3; % Transmit power (Watts)
|
|
||||||
BW = 20e6; % Bandwidth (Hz)
|
|
||||||
f_c = 2e9; % Center frequency (Hz)
|
|
||||||
|
|
||||||
tc.testClass = tc.testClass.initialize(P_TX, BW, f_c);
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user