MATLAB: Is it possible to divide a decimal number into 3 decimal numbers binarysimulink Hello everybody, I want to break a 12-bit decimal number into 3 decimals numbers. FOR EXAMPLE. 1000 decimal = 0b 0011 1110 1000 = 3, 13 and 8 in decimal numbers. Best Answer >> N = 1000;>> R = 3;>> C = R+R*fix(log2(N)/R);>> M = reshape(dec2bin(N,C),[],R).'M =001111101000>> bin2dec(M)ans = 3 14 8 Related SolutionsMATLAB: Decimal This is a user defined function available on the FEX: round2dp.To use it, you have to download it and then add to MATLAB the path where you unzip it. In MATLAB File > Set path MATLAB: Conversion of binary to decimal Hi ablaze, Your code has bin2dec trying to convert a string containing the word 'binary'. Trya = '1011'bin2dec(a) Related QuestionDecimalsCovert 128 binary string into hex decimal
Best Answer