From help-request at octave dot org Sat Feb 26 02:55:33 2005 Subject: reading NaN with fscanf From: Claudio Belotti To: help at octave dot org Date: Sat, 26 Feb 2005 09:59:19 +0100 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 -------------------------------------------------------------