Matlab loop through 100 files and add line of text (Depending on file number)
1 view (last 30 days)
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.