s =;
BJ=sym (zero (size)); The% array BJ is used to store labels.
Big = 3; % defines the variance greater than 3 as "much larger" and can be modified as needed.
For ii=2: length (seconds)-1
If s (ii)-big > S(ii- 1) and amps (ii)-big > S(ii+ 1)
BJ ii) =' A
BJ(ii+ 1)= ' B ';
BJ(ii+2)= ' C ';
end
end
BJ
Final output
BJ=[ 0,A,B,C,0,0,A,B,C,0]