The if statement did not work for x =1.
Their is a function for this already.
iscolumn(x)
I guess this exercise is about learning that this function exists.
1836 Solvers
Given an unsigned integer x, find the largest y by rearranging the bits in x
781 Solvers
267 Solvers
746 Solvers
373 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!