Invisible file in uigetfile

조회 수: 2 (최근 30일)
Sam Mlawer
Sam Mlawer 2021년 3월 9일
답변: Monisha Nalluru 2021년 3월 12일
I'm making an app and I'm trying to use uigetfile to select a text file to open and analyze, but when I run uigetfile with no arguments these files are not visible in the ui. Windows says these text files are of type "File" which is probably why these files aren't showing up. If I manually enter the filenames, MATLAB has no problem opening them up, but that isn't really an ideal way for the app to work. Any ideas on how to make these files visible in uigetfile?
Thanks!

채택된 답변

Monisha Nalluru
Monisha Nalluru 2021년 3월 12일
uigetfile function opens a diaglog by default checking to all MATLAB files.
You can change the option to "All Files" in order to display the text files in dialog box.
Or use filter option with uigetfile function
As an example
filename = uigetfile("*.txt"); % opens a dialog box with all filenames ending with .txt

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by