53やFEなど、16進数のデータが一列に並んでいるデータがあるのですが、これを10進数に変換したいのですが、hex2decの関数を使うとエラーが出てしまいます、どのようにすればいいでしょうか。
Ältere Kommentare anzeigen
Antworten (1)
Musashi Ito
am 16 Jan. 2020
Bearbeitet: Musashi Ito
am 16 Jan. 2020
MATLAB には文字列というデータ型があるみたいで、hex2dec 関数を使用するときも 16 進数のデータを 文字列データとして入力すれば 10 進数の数値データに変換できるみたいです。以下のようなプログラムの書き方であればエラーは出ないみたいですが、いかがでしょうか。
d1 = hex2dec('53')
d2 = hex2dec('FE')
Kategorien
Mehr zu データ型の変換 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!