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: textread/textscan not reading formatted text with whitespace
Replies: 19   Last Post: Oct 22, 2013 5:13 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Norbert Marwan

Posts: 7
Registered: 10/2/13
Re: textread/textscan not reading formatted text with whitespace
Posted: Oct 22, 2013 3:56 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <l462ri$s24$1@speranza.aioe.org>...
> On 10/22/2013 9:06 AM, dpb wrote:
> ...
>

> >> The interesting point here is '(....)(..)(..)(...)(...)' which allows
> >> considering the fixed field width. I wonder why such is not working in
> >> textread or textscan directly ?
> >>

> ...
>

> > Why it doesn't work in textread or textscan directly is because it is a
> > completely independent preprocessing step that modifies the input

> ...
>

> > ... ask TMW to generalize the above solution to a
> > helper mex function that could take the input format of the data and do
> > the preprocessing automagically such that textscan and friends can
> > process it -- that would be a big step forward albeit still a poor
> > substitute for Fortran-like FORMAT i/o. The biggest problem with the
> > above is that regexp is notoriously slow; not sure how this particular
> > case will perform...

> ...
>
> Actually, I don't see why the regexp() folderol...with fixed-width
> fields simplest and quickest would be to simply insert the comma in the
> appropriate columns w/ strrep() or similar direct manipulation. Looks
> like complexity for the sake of showing cleverness???
>
> --


because it is much slower for long data files with ten-thousends of lines. the from the support suggested solution is much faster, but not as fast as textread can be.

i wonder why the '(....)(..)(..)(...)(...)' is not applicable to textread or textscan. this would also help. but noooo, this would be too simple.


Date Subject Author
10/2/13
Read textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
Derek Goring
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/3/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/3/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/3/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/3/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb

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.