53やFEなど、16進数のデータが一列に並んでいるデータがあるのですが、これを10進数に変換したいのですが、hex2decの関数を使うとエラーが出てしまいます、どのようにすればいいでしょうか。
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
タイトルと同義
1 Commento
Risposte (1)
Musashi Ito
il 16 Gen 2020
Modificato: Musashi Ito
il 16 Gen 2020
MATLAB には文字列というデータ型があるみたいで、hex2dec 関数を使用するときも 16 進数のデータを 文字列データとして入力すれば 10 進数の数値データに変換できるみたいです。以下のようなプログラムの書き方であればエラーは出ないみたいですが、いかがでしょうか。
d1 = hex2dec('53')
d2 = hex2dec('FE')
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!