필터 지우기
필터 지우기

show part of filenames using uigetfile

조회 수: 1 (최근 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 CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by