Error using dlmwrite (line 124) Cannot open file

조회 수: 17 (최근 30일)
Olcay Polat
Olcay Polat 2015년 6월 4일
댓글: Olcay Polat 2015년 6월 4일
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
Olcay Polat
Olcay Polat 2015년 6월 4일
Thanks, the title is corrected.
Jan
Jan 2015년 6월 4일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2015년 6월 4일
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
Olcay Polat
Olcay Polat 2015년 6월 4일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by