show part of filenames using uigetfile

3 ビュー (過去 30 日間)
Yu Li
Yu Li 2019 年 2 月 26 日
コメント済み: Yu Li 2019 年 2 月 26 日
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')
Yu Li
Yu Li 2019 年 2 月 26 日
Thank you.
Bests,
Yu

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by