I need to save multiple text files with the same name, just incrementing numbers at the end of the filename. The function I'm using, writetable, requires to specify the filename between apostrophes, so the function cannot recognize the changing filename, returning as output always the same. Thank you!
"The function I'm using, writetable, requires to specify the filename between apostrophes..."
Actually the writetable documentation states that the filenames must be specified by a character vector or a scalar string. In either case it makes no difference if the name is specified in the function call or supplied as a variable.
"so the function cannot recognize the changing filename"
Actually it does (just like all MATLAB function that read/write file data do). For example, you could do this: