convert decimal to hex

18 ビュー (過去 30 日間)
dhafar hamed
dhafar hamed 2020 年 9 月 18 日
コメント済み: Walter Roberson 2020 年 9 月 19 日
suppose i have below vector
V = [11, 23, 56, 67, 15, 89, 99, 12, 10, 67, 87,98,54,23,57,89,90,97,69,59, 23, 56, 67, 15, 89, 99, 12, 10, 67, 87,98,54,23,77,65,67,97,69,59, 23, 56, 67, 15, 89, 78, 12, 10, 67, 87,98,34,23,57,89,12,97,69,59]
i want to convert V to hex then the result will be as below
1E240E12A2B3C

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 9 月 18 日
sprintf('%02x',V)
  1 件のコメント
Walter Roberson
Walter Roberson 2020 年 9 月 19 日
What difficulty are you having?
The input you show is 60 elements if I count correctly. Your desired output example is 14 characters. There is no obvious way to get from 60 bytes of input to 14 hex digits of output.

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

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by