フィルターのクリア

How to convert a long string into desired length variables or cells?

1 回表示 (過去 30 日間)
arda has
arda has 2021 年 5 月 28 日
編集済み: arda has 2021 年 5 月 28 日
i have a string that contains 256000 character. Actually it has hexadecimal numbers like "ea3672f1a90....."
I would like to convert this string into a variable like 256000x1 double (every number in a cell) or maybe every 8 number in a cell like 32000x1 variable.
How can i do that i tried so many codes but couldnt achieved success.

採用された回答

Stephen23
Stephen23 2021 年 5 月 28 日
編集済み: Stephen23 2021 年 5 月 28 日
S = "ea3672f1a9012345";
V1 = sscanf(S,'%1x')
V1 = 16×1
14 10 3 6 7 2 15 1 10 9
V2 = sscanf(S,'%8x')
V2 = 2×1
3929436913 2835424069
  1 件のコメント
arda has
arda has 2021 年 5 月 28 日
編集済み: arda has 2021 年 5 月 28 日
Thank you

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

その他の回答 (1 件)

KSSV
KSSV 2021 年 5 月 28 日
Read about hex2num

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by