reading "overpunched" characters
Show older comments
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?)
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!