필터 지우기
필터 지우기

Could I use uigetfile without Message "no file, check the file name...." ?

조회 수: 1 (최근 30일)
Kwon
Kwon 2013년 10월 28일
편집: Kwon 2013년 10월 28일
I use this code in MATLAB R2012a.
[fileName, pathName, filterIndex] = uigetfile({'*.*';'*.xls';'*.txt';'*.csv'}, 'Select file(s)', 'MultiSelect', 'on','D:\');

채택된 답변

Image Analyst
Image Analyst 2013년 10월 28일
Most likely you just tried to use fileName. Bad decision. You need to construct the full filename (folder plus base filename plus extension):
fullFileName = fullfile(pathName, fileName);
Then use fullFileName wherever you tried to use fileName in subsequent code.
  댓글 수: 3
Image Analyst
Image Analyst 2013년 10월 28일
Then you then you did not use fullfile() as I recommended because if you did, it would have shown a folder name.
Kwon
Kwon 2013년 10월 28일
편집: Kwon 2013년 10월 28일
Do you mean like following ? " [fileName, pathName, filterIndex] = uigetfile({'*.*';'*.xls';'*.txt';'*.csv'}, 'Select file(s)', 'MultiSelect', 'on','D:\'); fullFileName = fullfile(pathName, fileName); "
I say one sentence.
I rewrite " of "a.csv" "b.csv" that file name of Select file(s) Window. But when I rewrite the file name, rarely it operate but many view the Message(a.csv The file does not exist. File name, make sure that it is spelled correctly.).

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2013년 10월 28일
That code will not emit that message. The code you have after it might emit such a message.

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by