Matlab loop through 100 files and add line of text (Depending on file number)

1 view (last 30 days)
Hello,
I have 100 files, labeled 1,2,3,4...100
I want to add a line of text to each file depending on the file number. I have an excel file with the A column numbered 1 through 100 and B column contains the text I need to add to each file named 1 to 100.
If I want to add the line of text in column B of my excel file corresponding to the filename in the A column, can MATLAB do this? I would want to add the new line to line 32.
I've tried using cell arrays and whatnot but I'm relatively new to MATLAB and wondering if it can solve my issue of manually going though each file.

Answers (0)

Categories

Find more on Entering Commands in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!