MATLAB: How can i decode(unpack) an array of bits with a constant value decoding bitsunpacking bits For example; I have an array; [0 0 0 1 1 1 0 0 0]. and a constant value L= 3 how can i get the output as; [0 1 0] ? Best Answer Not sure what the "rule" really is for getting the bits. Maybe one of these?x = your vectorL = your numberresult = x(1:L:end);or mayberesult = any(reshape(x,L,[]));or mayberesult = all(reshape(x,L,[]));If not one of the above, then maybe you could give us more details on the "rules" for the unpacking. Related SolutionsMATLAB: Demapp “IQ array of length 6” to “Bits array of length 12” How about this?x = [1+j; -1-j; -1+j; 1-j];result = [real(x)<0, imag(x)<0];It turns a column vector of imaginary numbers into a two-column array with the results. MATLAB: How can i decode an array following some conditions method one: median:>> y = [0,1,0,0,1,1,0,0,1];>> median(reshape(y,3,[]))ans = 0 1 0method two: round:>> round(mean(reshape(y,3,[])))ans = 0 1 0 Related QuestionI make mistakes while creating a matrixLogsout.unpack(‘all’) Slow PerformanceIs this matlab code of 8psk ?Pythons unpack_From in MatlabHow to convert an array of decimal values to binaryIs HelperUnpackUDP gone
Best Answer