Effacer les filtres
Effacer les filtres

show part of filenames using uigetfile

1 vue (au cours des 30 derniers jours)
Yu Li
Yu Li le 26 Fév 2019
Commenté : Yu Li le 26 Fév 2019
Hi:
ther are lots of files with the same suffix, such as '.mat' in a folder, I have named them based on their features, for example:
test001.mat, test002.mat, .... test050.mat
experiment001.mat, experiment002.mat ..... experiment050.mat
simulation001.mat, simulation002.mat ..... simulation050.mat
yes I can use uigetfile('*.mat') to select the desired one, but is there anyway to only show part of them, for example, I enter a string 'test' as input, them only shows the testxxx.mat?
Bests,
Yu

Réponse acceptée

Alex Mcaulley
Alex Mcaulley le 26 Fév 2019
Is that that you need?
filename = uigetfile('test*.mat')
  2 commentaires
Adam Danz
Adam Danz le 26 Fév 2019
Modifié(e) : Adam Danz le 26 Fév 2019
You can also specify the path to the directory
filename = uigetfile('C:\Users\ntesla\Documents\MATLAB\test*.mat')
Yu Li
Yu Li le 26 Fév 2019
Thank you.
Bests,
Yu

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by