Hello,
I have a vector, which represents basically a binary signal [0,1].
if the consecutive binary numbers is smaller than x, I want to find them and set them to the opposite value.
Example:
binaryValue = [ 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0];
if I define:
x <=4 ; % for zero values;
i will have:
binaryValue_new = [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0];
Best Answer