integer to binary conversion

조회 수: 4 (최근 30일)
ABDUL
ABDUL 2018년 4월 17일
답변: Walter Roberson 2018년 4월 17일
how to convert the random integers into binary form for the multidimensional matrix of size m x n x p .

채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 17일
cast() to the smallest integer type guaranteed to be able to represent the signed value range you need. typecast to the unsigned integer of the same size. dec2bin to get binary coded as characters. Subtract '0' to get binary numeric.
Instead of dec2bin and subtract, you might be able use de2bi

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by