[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reading NaN with fscanf
From: |
Claudio Belotti |
Subject: |
reading NaN with fscanf |
Date: |
Sat, 26 Feb 2005 09:59:19 +0100 |
User-agent: |
Debian Thunderbird 1.0 (X11/20050116) |
hi all,
I want to read an ascii file like this:
data_name_1 [data_dimension]
1
2
3
nan
nan
4
5
data_name_2 [data_dimension]
.
.
after reading the string I use fscanf to get the numerical values,
[this_data,count]=fscanf(fh,"%f",[1,this_dimension]);
but as soon as I found "nan" fscanf returns.
I handle this checking count and this_dimension, is there a way to let
fscanf accept both digit and "nan"?
thanks
Claudio
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- reading NaN with fscanf,
Claudio Belotti <=