uigetfile filter error with 2025a works fine in 2024b
Mostrar comentarios más antiguos
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 comentario
Gavin
el 28 de Oct. de 2025
Respuestas (1)
Akira Agata
el 29 de Oct. de 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 comentarios
Gavin
el 29 de Oct. de 2025
Gavin
el 29 de Oct. de 2025
Gavin
el 31 de Oct. de 2025
Walter Roberson
el 31 de Oct. de 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
el 4 de Nov. de 2025
Categorías
Más información sobre App Building en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!