Which is better to use in my case -uigetfile or uigetdir?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a archived files in the following location- C:\Archive\project_dir\project_folder.
I have a Browse button in the GUI, which should allow to choose the entire project folder (It consists of .mat files). Which command is better for my requirement, uigetfile or uigetdir?
Note: Also, I need to have a check if the user has selected the file within the folder C:\Archive\project_dir. It is not possible to select the project_folder outside this directory location.
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2014년 6월 24일
f='C:\Archive\project_dir\project_folder\'
[file,pat]=uigetfile(f,'*.mat')
yourfile=fullfile(pat,file)
test=isequal(f,pat) % to check if the user has selected the right folder
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!