how filter "*.*" when using uigetfile function.

when load a file by uigetfile can see (*.*) , althougth i only filter the "*.mat";"*.xls";"*.xlsx" . so how can i implement the drop-down menu is not displayed(*.*)
[FileName, FilePath] = uigetfile(["*.mat";"*.xls";"*.xlsx"]);

 채택된 답변

Stephen23
Stephen23 2022년 9월 16일
편집: Stephen23 2022년 9월 16일

0 개 추천

If there are no descriptors, the "All files" is automatically appened onto the end of the filter. The solution is to add descriptors to your filter string array, e.g.:
[FileName, FilePath] = uigetfile(["*.mat","ABC";"*.xls","DEF";"*.xlsx","GHI"])
Of course you should change the descriptors to suit those file extensions.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

질문:

2022년 9월 16일

편집:

2022년 9월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by