% MSSTRACE: Matrix A(N,5) has:
%
%           A(:,1): time in seconds
%           A(:,3): selection value (0 - current mic, 1 - new mic)
%           A(:,5): mix idx

tgood = [0 8 8 16 16 24 24 32 32 40];
xgood = [-146 -146 -90 -90 146 146 -34 -34 34 34];
t = A(:,1);
sel = A(:,3);
idx0 = find(sel == 0);
idx1 = find(sel == 1);

x = A(idx0,2);
y = A(idx1,2);
t0 = t(idx0);
t1 = t(idx1);

hx=stairs(t0, x, 'linew',2);
hold on;
hy=stairs(t1, y, 'color',[0 0.5 0]);
hg=stairs(tgood,xgood,'r','linew',2);
hold off;

grid;

% nothing past this point
