Incrementing file names to run loop commands
24 views (last 30 days)
I am trying to write a short script to input some data from a list of files. The file names have a form as followed
and so on
I would like to write a script in a loop format kind of like this
Sample_run1_[n]V = sparameters('Sample_run1_[n]V_dev.s2p')
I would like the loop to increment the name of the file by changing just the characters in the brackets which will always be number and they will increment by 5 with each file name.
Currently I am doing this with a command for each file. After I import I then have to process the data which I again do but creating a block that executes the process for each file name but I would like to do this with a loop so I could write the commands once then repeat it by incrementing through the file names.
Thank you for the help