Assign a part of file name to a variable
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nitish Reddy Kotkur
le 20 Oct 2019
Réponse apportée : dpb
le 20 Oct 2019
myfolderinfo = dir('some_random_folder') ;
N = length(myfolderinfo) ;
for i = 3:N
thisfile = myfolderinfo(i).name
some_random_folder contains text files with names 5_5.txt,6_6.txt...50_50txt,50_51.txt
now i want to assign the value after underscore to a variable m. such as for file 5_5.txt then m=5 and for file 50_51.txt then m=51
how can i assign those values to m
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Report Generator dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!