Effacer les filtres
Effacer les filtres

How to implement a for cycle to run a sequence of text files with the system command

2 vues (au cours des 30 derniers jours)
Hugo
Hugo le 17 Juil 2023
Commenté : Voss le 15 Août 2023
Hi,
I would like to open a sequence of files by combining a for cycle and a list of files to open. How can I do that? I attach a sample list, that I plan to use as an input.
I thank you in advance.

Réponses (1)

Voss
Voss le 17 Juil 2023
Here's one way:
fid = fopen('system_TXT.txt');
while ~feof(fid)
file_name = fgetl(fid);
% process file file_name
end
fclose(fid);

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Tags

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by