function output = check_results(x,y)
% a simple signal check-up. This function
% is optional, maybe good for debugging
% purposes, but could be left out in the
% final implementation
n = length(x);
m1 = 0;
m2 = 0;
for i = 1:length(x)
    if x{i}(1) == 'S'
        m1 = m1 + 1;
    end
    if x{i}(2) == 'S'
        m2 = m2 + 1;
    end
end

if m1 == n
    output.OP = 'ALL_S';
    %error('OP all S');
else
    output.OP = 'OK';
end
if m2 == n
    output.MV = 'ALL_S';
    %error('MV all S');
else
    output.MV = 'OK';
end
output.length_raw = length(y);
output.length = n;
output.length_S_OP = m1;
output.length_S_MV = m2;
return
