as here we have to compare 1st two bits only, we are taking 1st two bits by a(1:2), means values of a starting from 1st position to 2nd position.
Given an unsigned integer x, find the largest y by rearranging the bits in x
795 Solvers
15398 Solvers
Make a run-length companion vector
520 Solvers
Flag largest magnitude swings as they occur
588 Solvers
492 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!