home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / softsys / matlab / 170 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.2 KB

  1. Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!lll-winken!taurus.cs.nps.navy.mil!stockel
  2. From: stockel@taupo.oc.nps.navy.mil (Jim Stockel)
  3. Newsgroups: comp.soft-sys.matlab
  4. Subject: fscanf in v4.0
  5. Message-ID: <C1Fqxv.HKo@taurus.cs.nps.navy.mil>
  6. Date: 26 Jan 93 00:34:42 GMT
  7. Sender: news@taurus.cs.nps.navy.mil
  8. Distribution: usa
  9. Organization: Naval Postgraduate School,Monterey CA
  10. Lines: 18
  11.  
  12. Hi,
  13.  
  14. I'm fairly new to Matlab and have v4.0.  A typical data file for me contains
  15. some strings for documentation/plot labeling, and some data.  I've tried
  16. the [A,count] = fscanf(fid,'format',size)  routine for reading strings, 
  17. but it leaves something to be desired.  With no size argument, 
  18. it tries to read to the end of file.  If a size argument is used
  19. then that is the number of whitespace seperated groups of characters are 
  20. read (ie. words).  Isn't there a way to read a newline terminated string?
  21. Am I missing something?  Is there a better way to read strings?
  22.  
  23. If anyone has any helpful hints I would be much obliged.  If there is
  24. interest I will post a summary.  Thanks, -jim
  25.  
  26. -- 
  27. Jim Stockel                     |
  28. stockel@taupo.oc.nps.navy.mil   |
  29. (408) 656-3256                  |
  30.