uigetfile filter error with 2025a works fine in 2024b
Ältere Kommentare anzeigen
I use uigetfile to open various types of files for my users mostly txt, but I want to be more specific.
for example
[infile, apploc] = uigetfile('*Stim*.txt', 'Select a Stimulus File',infile);
it pops up fine in 2024b but when I run it in 2025a I get this error and the filter doesn't apply.
Warning: Invalid file filter *Stim*.txt
Does 2025b fix this or must I go back to 2024b?
1 Kommentar
Gavin
am 28 Okt. 2025
Antworten (1)
Akira Agata
am 29 Okt. 2025
For your purpose, the following syntax is correct and works in both MATLAB version:
[infile, apploc] = uigetfile("*.txt", "Select a Stimulus File", "*Stim*.txt");
5 Kommentare
Gavin
am 29 Okt. 2025
Gavin
am 29 Okt. 2025
Gavin
am 31 Okt. 2025
Walter Roberson
am 31 Okt. 2025
@Gavin By "right type" do you mean that you want the file name to be fixed but the user to have the choice of file extensions? Or do you mean that you want the user to be able to change the file name while keeping the file extension fixed? Or something else?
Gavin
am 4 Nov. 2025
Kategorien
Mehr zu App Building finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!