reading "overpunched" characters
古いコメントを表示
I'm reading a legacy data format, in which negative numbers were represented by the first numeral being "overpunched". i.e. 123 is 123, but -123 is J23, -234 is K34, and so on down to -987 is R87.
I'm reading long columns of ASCII numbers and converting them to the appropriate double.
Can anyone suggest an efficient way of making this conversion (besides looping through find(char=='J') etc. and replacing with correct signed numbers?)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!