uigetfile filter error with 2025a works fine in 2024b
古いコメントを表示
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 件)
Akira Agata
2025 年 10 月 29 日
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 件のコメント
Gavin
2025 年 10 月 29 日
Gavin
2025 年 10 月 29 日
Gavin
2025 年 10 月 31 日
Walter Roberson
2025 年 10 月 31 日
@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
2025 年 11 月 4 日
カテゴリ
ヘルプ センター および File Exchange で App Building についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!