🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.soft-sys.matlab
Article #70

fscanf in v4.0

#70
From: Jim Stockel
Date: Tue, 26 Jan 1993 00:34
18 lines
1218 bytes
Hi,

I'm fairly new to Matlab and have v4.0.  A typical data file for me contains
some strings for documentation/plot labeling, and some data.  I've tried
the [A,count] = fscanf(fid,'format',size)  routine for reading strings, 
but it leaves something to be desired.  With no size argument, 
it tries to read to the end of file.  If a size argument is used
then that is the number of whitespace seperated groups of characters are 
read (ie. words).  Isn't there a way to read a newline terminated string?
Am I missing something?  Is there a better way to read strings?

If anyone has any helpful hints I would be much obliged.  If there is
interest I will post a summary.  Thanks, -jim

-- 
Jim Stockel                     |
stockel@taupo.oc.nps.navy.mil   |
(408) 656-3256                  |
Technical Details
Message-ID: <C1Fqxv.HKo@taurus.cs.nps.navy.mil>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!lll-winken!taurus.cs.nps.navy.mil!stockel

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!lll-winken!taurus.cs.nps.navy.mil!stockel
From: stockel@taupo.oc.nps.navy.mil (Jim Stockel)
Newsgroups: comp.soft-sys.matlab
Subject: fscanf in v4.0
Message-ID: <C1Fqxv.HKo@taurus.cs.nps.navy.mil>
Date: 26 Jan 93 00:34:42 GMT
Sender: news@taurus.cs.nps.navy.mil
Distribution: usa
Organization: Naval Postgraduate School,Monterey CA
Lines: 18