Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Problems with fscanf
Replies: 1   Last Post: Aug 15, 1996 9:58 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Andrew Adler

Posts: 7
Registered: 12/7/04
Problems with fscanf
Posted: Aug 14, 1996 1:05 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

I'm trying to use MATLAB to read in an ASCII file and interpret it.

My problem is that there seems no way to use fscanf to read in a
whole line.

I can read in a white-space delimited word with

fscanf(fid,'%s',1)

But to get I line I must do

c= fread(fid,1);
while c~=10
line= [line c];
c= fread(fid,1);
end

This is a mega-pain (tm).
Is there a way to do it with fscanf.


Thanks,
_________________________________________________________
Andy Adler, |Meakins-Christie Labs |Lab 514-398-1452
andy@meakins.lan.mcgill.ca|McGill U.,Montréal,Canada|Fax 514-398-7483

Starting from a principle is affirmed by people of experience to
be a very reasonable procedure; I am willing to humour them, and so
begin with the principle that all men are bores. - Kierkegaard





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.