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: load column in from text file
Replies: 12   Last Post: Dec 11, 2012 3:47 PM

Advanced Search

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

Posts: 8
Registered: 12/15/10
Re: load column in from text file
Posted: Dec 8, 2012 8:10 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <> wrote in message <k9vtoo$100$>...
> On 12/8/2012 11:12 AM, Fiboehh wrote:
> ...

> > I have just the same code as you, but MATLAB gives sometimes error with
> > files which work fine if I load them in one by one :s
> > If my ascii-file is named 1_01.txt everything works fine, but if I use
> > 2_01.txt it gives a fellowing error;
> >
> > Error using importdata (line 137)
> > Unable to open file.
> >
> > Error in ScienceWeek (line 11)
> > log = importdata(fnames(k).name);
> >
> > Do you have a clue what is going wrong?

> The error indicates the file probably doesn't exist -- perhaps you don't
> have the correct working directory or it could possibly be protected or
> the name isn't actually correct...
> Other than that, from here it's hard to say.
> Might try using debugger and when it errors poke around at the command
> line and see what local context is at that point. Probably will be
> illuminating...
> --

Unbelieveble strange, but it just doesn't work with certain names. It must be something with the internal syntax in MATLAB. A bug or something, but if I import a text file in under the name 'a.txt' it gives an error: unable to open file, and if I rename the same file to '1_01.txt' it works :s :s
Totally nuts. I'm know manually converting all my files so that it can work automatically.
Sometimes a though how to avoid this bug/make it work without renaming manually the files?

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.