I need to set a file as an input
30 visualizaciones (últimos 30 días)
This is a bit complex. I have a .m file that currently opens a .txt file, edits that file, and saves it under a new name. I currently have the file names for both the file that is opened/edited and the file name that the edited code is saved under hard-coded into my .m file. However, I am going to have to use this program with many different .txt files. I would like to not have to change the .m file's code every time I need to use the program with a different .txt file. Is there anyway I could tell MATLAB which file to open and what to save the edited file as from the command window? So essentially I need to set the old file and new file name as a input variable of sorts in my .m file. I would appreciate any help.