The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: reading text file line by line
Replies: 10   Last Post: Aug 4, 2012 8:50 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Leyo Joseph

Posts: 67
Registered: 3/19/09
Re: reading text file line by line
Posted: Aug 3, 2012 3:33 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <> wrote in message <jvh7tp$2hl$>...
> On 8/3/2012 2:03 PM, Leyo Joseph wrote:
> ...
> ...

> > A=fscanf(KK,'%s');
> >
> > This reads the whole content of data.txt to A without any line breaks or
> > spaces. How to make it read line by line and keeping the spaces as in
> > data.txt?

> ...
> data = textread('data.txt','%s','delimiter','\n','whitespace','');
> No...This didn't work... It is just giving a column matrix with ' '

> --

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.