show part of filenames using uigetfile

1 次查看(过去 30 天)
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

采纳的回答

Alex Mcaulley
Alex Mcaulley 2019-2-26
Is that that you need?
filename = uigetfile('test*.mat')
  2 个评论
Adam Danz
Adam Danz 2019-2-26
编辑:Adam Danz 2019-2-26
You can also specify the path to the directory
filename = uigetfile('C:\Users\ntesla\Documents\MATLAB\test*.mat')

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Testing Frameworks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by