Adding zeros to a number

14 ビュー (過去 30 日間)
WhatIsMatlab-
WhatIsMatlab- 2016 年 2 月 20 日
コメント済み: WhatIsMatlab- 2016 年 2 月 20 日
So I have this number 0 1 0 1 0 it is only 5 bits long but I want to add all zeros to the end of the number to make it 23 bits long. I have played around with this some but I cannot seem to get it to add zeros to the end of the number.
Thanks

採用された回答

Walter Roberson
Walter Roberson 2016 年 2 月 20 日
A = [0 1 0 1 0];
A = [A, zeros(1, 23-length(A))];
  1 件のコメント
WhatIsMatlab-
WhatIsMatlab- 2016 年 2 月 20 日
Thank you!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by