How to get the file names that start with the same letter in the folder?

16 visualizzazioni (ultimi 30 giorni)
How to get the file names that start with the same letter in the folder?

Risposta accettata

KSSV
KSSV il 17 Set 2021
Modificato: KSSV il 17 Set 2021
f = dir('T*.bin') ;
N = length(f) ;
for i = 1:N
f(i).name
end

Più risposte (2)

Matt J
Matt J il 17 Set 2021
Modificato: Matt J il 17 Set 2021
For example,
s=dir('T*_imag.bin');
fileNames={s([s.isdir]==0).name}

Chunru
Chunru il 17 Set 2021
fn = dir('T*.*') % you can use 'T*.T', 'T15*.bin', etc

Categorie

Scopri di più su File Name Construction in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by