?? stats.m
字號:
function Stats(Strength, RSSI, size, Time)
% This function ->
% State:
% - Given the original strength data the std, mean and range is
% calcuated.
% - The variance of signal strength is drawn over the
% propper calculated timetime
% - If the exact time is wanted and not an estiamate, the time
% within the then the packets file is passed as an argumented. If
% this is wanted uncomment line 25-33 and comment line 14-23.
% Actually calculate the time that the experiment was run, as input vector
% is only the different in time.
Time(1) = 1;
Time(2) = 3;
for i=2:length(Strength)
Time(i) = Time(i-1) + size + 1;
end
% Change to minutes
for i=1:length(Time)
Time(i) = (Time(i)/60) * 2;
end
% Time(1) = 0;
% for (i=2:length(Time))
% Time(i) = Time(i - 1) + Time(i);
% end
% % Change to minutes
% for i=1:length(Time)
% Time(i) = (Time(i)/60);
% end
% Statistical Analysis
% The sample standard deviation, the sample mean, the sample range
disp('Stats for RSSI:')
Standard_Deviation = std(RSSI)
Mean = (mean(RSSI) - 256)
Range = max(RSSI) - min(RSSI)
figure; plot(Time, Strength); title('Time Variance of Signal Strength'); xlabel('Time (minutes)'); ylabel('Signal Strength (dB)');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -