How to use the function uigetfile?
조회 수: 13 (최근 30일)
이전 댓글 표시
When I use the uigetfile function
And want to select any file that is not in the same folder as my M file code
I'm getting an error
How can I select the file from any folder on my computer?
댓글 수: 0
채택된 답변
Walter Roberson
2021년 7월 13일
[read_my_file, rmfdir] = uigetfile('*.xlsx')
if ~ischar(read_my_file); return; end %user cancel
rmfn = fullfile(rmfdir, read_my_file)
read_my_file_table = readtable(rmfn) ;
추가 답변 (1개)
ANKUR KUMAR
2021년 7월 13일
편집: ANKUR KUMAR
2021년 7월 13일
"How can I select the file from any folder on my computer?"
This is pretty simple. You need to provide the full path of the file while calling uigetfile function.
uigetfile('D:\folder\subfolder\subsubfolder\*.xlsx')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!