Commit 6bab1ca3 authored by Simone Liuzzo's avatar Simone Liuzzo

exclude identical measurements

parent 5e1af3f9
......@@ -66,16 +66,32 @@ for i=1:average
thi(:,i)=hor;
tvi(:,i)=ver;
tsi(:,i)=sig;
end
% test for identical data, in case, remove it
selrem = [];
for i=2:average
if thi(:,i-1) == thi(:,i)
selrem = [selrem i]; %#ok<AGROW>
end
end
if ~isempty(selrem)
thi(:,selrem) = NaN(size(thi(:,selrem)));
tvi(:,selrem) = NaN(size(tvi(:,selrem)));
tsi(:,selrem) = NaN(size(tsi(:,selrem)));
disp("dataset " + selrem' + " is strictly identical to previus. removed")
end
% get mean readind
th = mean2(thi,2)';
tv = mean2(tvi,2)';
ts = mean2(tsi,2)';
o = [th;tv;ts];
% get reading error
eth = std2(thi,1,2)';
etv = std2(tvi,1,2)';
ets = std2(tsi,1,2)';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment