help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sscanf parameter size = Inf


From: Søren Hauberg
Subject: Re: sscanf parameter size = Inf
Date: Wed, 18 Jul 2007 13:08:08 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

address@hidden skrev:
Hi all

I searched in the archives (nabble) for this problem, but I couldn't found
a solution.

I tried to read an unknown amount of numers in a text line
with sscanf, but it returns only the first number..

example:
=======

strLine = fgetl(fid);
## strLine e.g.: "1.2345 2.1345 3.1234 5.1234"
## delimiter is a simple space sign!
[vals count] = sscanf(strLine,"%f","Inf");
You should write "Inf" as a string, so your last line should look like this:

[vals count] = sscanf(strLine,"%f",Inf);

Søren


reply via email to

[Prev in Thread] Current Thread [Next in Thread]