フィルターのクリア

Converting decimal to binary with output data type 'double'

4 ビュー (過去 30 日間)
Daniel
Daniel 2014 年 1 月 1 日
コメント済み: mak khatib 2017 年 12 月 5 日
Hello, I am trying to convert decimal to binary.
I know that I need to use dec2bin; however, I want my binary number to be
a double instead of character.
Any idea how?
(The reason behind this is, because I will be implementing this in Simulink, which does not support char...)

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 1 月 1 日
dec2bin(YourNumber, 8) - '0'
  4 件のコメント
Image Analyst
Image Analyst 2014 年 1 月 1 日
Mark as Accepted, so people like me don't need to open this discussion unnecessarily, and so Walter gets credit for helping you.
mak khatib
mak khatib 2017 年 12 月 5 日
Thank you Mr. Walter!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by