Selecting files based on name - how to select files WITHOUT suffix

조회 수: 1 (최근 30일)
Janna Hinchliff
Janna Hinchliff 2019년 2월 15일
답변: adi kul 2019년 2월 15일
I've been given some data to analyse and the file names are in the following format:
Optowell3956814
Optowell3956814Censoring
Optowell3956814FailTimes
Optowell3956814scantimes
where the number in the middle changes depending on the sample. I want to be able to select all of the files of the form Optowell3956814 and ignore the others. How can I select these?

답변 (1개)

adi kul
adi kul 2019년 2월 15일
You can try this:
[filepath,name,ext] = fileparts(YourFileName);

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by