dpb <email@example.com> wrote in message <firstname.lastname@example.org>... > 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?