Effacer les filtres
Effacer les filtres

uigetfile doesn't get all files with a certain extension

8 vues (au cours des 30 derniers jours)
Douglas Anderson
Douglas Anderson le 6 Déc 2021
Réponse apportée : dpb le 6 Déc 2021
I have an app that calls
[x,y] = uigetfile({'*.TXA;*.txt'});
where .TXA is a different type of text file. All of a sudden today uigetfile doesn't find all of these files in the folder, but in fact finds five .txt files that I don't care about. I rebooted MATLAB, and then the whole computer, and it still only finds a few .txt files.
Any clue what's going on? Thanks!
Doug Anderson

Réponse acceptée

dpb
dpb le 6 Déc 2021
My old eyes didn't see it first go -- your list of extensions is malformed -- use
[f,p] = uigetfile({'*.TXA';'*.txt'});
instead. It's a cell array of extensions, you had a single cell string so it was trying to match the whole enchilada, not each one separately.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Tags

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by