location of file created by fopen command
조회 수: 17 (최근 30일)
이전 댓글 표시
hello everyone,
I am creating a file using using the below command
[fid,message] = fopen('test1.dump','w')
my fid is a positive value but I could not find where the file was created. How can I locate the file in MATLAB
Thanks
댓글 수: 0
채택된 답변
Image Analyst
2013년 7월 3일
It will be in the current folder - just look at the top of MATLAB and it will show it to you. It's not very robust programming to do that. It's far more robust to specify the folder so you know exactly where the file gets saved to, rather than just going into whatever the current folder happens to be.
folder = 'C:\Users\Public\Documents'; % or wherever.
baseFileName = 'test1.dump';
fullFileName = fullfile(folder, baseFileName);
[fileID, message] = fopen(fullFileName, 'w')
댓글 수: 0
추가 답변 (1개)
Shashank Prasanna
2013년 7월 3일
It will be in the current folder.
>> pwd
Also
>> which -all test1.dump
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!