Error using dlmwrite (line 124) Cannot open file

8 views (last 30 days)
Hello,
I am getting following error on Matlab 2015a. I am working with same code by years, there was no problem up to 2015a. After this version, the problem started to occur. Same code working perfectly on my laptop which has 2013a.
code line:
----
dlmwrite('kayit.txt',kayit_yap, '\t');
---
error message:
--
Error using dlmwrite (line 124) Cannot open file kayit.txt.
Error in vns_feeder (line 152) dlmwrite('kayit.txt',kayit_yap, '\t');
--
Thanks in advance.
  3 Comments
Jan
Jan on 4 Jun 2015
It is strongly recommended to omit terms like "urgent" in the forum. Of course all users thinks, that their problem is urgent for themselves, but not for all readers, who participate in this forum voluntarily.

Sign in to comment.

Answers (1)

Jan
Jan on 4 Jun 2015
This means, that you do not have write privileges in the current folder. So either chnage to a folder where you can write using cd or better add a full path name to the file name:
folder = tempdir;
dlmwrite(fullfile(folder, 'kayit.txt'), kayit_yap, '\t')
  1 Comment
Olcay Polat
Olcay Polat on 4 Jun 2015
Thanks, actually same code working in different computers. So static path address may not help us. I also checked folder and file privileges, there is no problem.
Actually, I was working on Windows7 with Matlab 2013a and now I am on Windows8.1 with Matlab 2015a. The set path on dropbox folder. This may also a problem but there is still no problem in Laptop.

Sign in to comment.

Categories

Find more on Printing and Saving in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!