Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
saving data to the file
조회 수: 11 (최근 30일)
이전 댓글 표시
How to use function fprintf in Matlab2016b? Why thoe following comands are uncorrect?
fid = fopen('file.txt','a');
fprintf(fid,'%.6f %.6f %.6f\n',xw,yw,rw);
fclose(fid);
댓글 수: 4
답변 (2개)
Guillaume
2016년 10월 10일
Matlab failed to open the file. There may be many reasons for this, the file does not exist / the file is not is in the current directory (since you didn't specify a path) / you don't have read access to the file / something else.
Open the file with
[fid, errmsg] = fopen('file.txt', 'a');
assert(fid > 0, 'Failed to open file because: %s', errmsg);
And see what error you get.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!