[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
io format specifier question
From: |
marco restelli |
Subject: |
io format specifier question |
Date: |
Tue, 1 Jul 2008 20:02:36 +0200 |
Dear list members,
I need to read an ASCII file containing floating point numbers as
0.112977-141
which stands for 0.112977E-141 (i.e., the E is omitted). The point is,
fscanf(fp,'%e') treats this as two numbers, and using
line = fgets(fp);
x = str2num(line);
I get x = 0.112977 - 141 = -140.89
Is there a way to make octave understand this format?
(Notice that writing 0.112977-141 in place of 0.112977E-141 is
standard conforming behavior for FORTRAN programs)
Thank you,
Marco
- io format specifier question,
marco restelli <=