integer to binary conversion

7 ビュー (過去 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 Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by