> > It _could_ be a bug, but I doubt it. > > Try using FOPEN with two outputs to open the file. If the first output > is -1, look at the second output. It will be the message from the OS > hopefully identifying why it couldn't open the file. That may shed some > light on why you received an error from IMPORTDATA. My guess is either that > you have too many files open simultaneously or you already have it open in > some other program. > > -- > Steve Lord > email@example.com > To contact Technical Support use the Contact Us link on > http://www.mathworks.com
Thanx all for the support, I still don't know exactly why it doesn't work when I use a directory that is not the working directory (where my program is stored). But it turns out it only works when the directory where the text files are saved is the same as matlab script. Other directory doesn't work always, strange enough it does with certain names. So I can go further, and just have a lot of files in my working directory, but yeah it works :) Once again thanx to help me.