help-octave
[Top][All Lists]
Advanced

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

Re: how to load ascii- data file


From: Geraint Paul Bevan
Subject: Re: how to load ascii- data file
Date: Fri, 17 Oct 2003 14:45:08 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

j schreiber wrote:

|
| but then with fscanf, what do I have to use for fid?
| fid{1}  fid{id} or what is the syntax?
|
| and what do I have to use for "Template" in fscanf?
|
| regards, Jörg
|
|

Jorg,

use 'fid' and the template "%s'".


octave> fid = fopen('text.txt')
fid =
{
~  id = 3
~  name = text.txt
~  mode = r
~  arch = native
~  status = 1
}
octave> fscanf( fid , "%s'" )
ans = '1'
octave> fscanf( fid , "%s'" )
ans = 'Schi'
octave> fscanf( fid , "%s'" )
ans = 'Bucrg'
octave>


- --
Geraint Bevan
http://www.mech.gla.ac.uk/~gbevan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iEYEARECAAYFAj+P8mMACgkQcXV3N50QmNPb5gCdG21Bjdb12qZISfG5QGL3rdQO
zgkAoI6VrnjPGBsflh8DeONMKuSrf5Yv
=H26F
-----END PGP SIGNATURE-----




-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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