- #1
peterjaybee
- 62
- 0
Hi, in MATLAB I am trying to write a script and currently I save a matrix to a .txt file using save('expt1.txt', 'table', '-ascii'). 'table' is the matrix I want to write to file.
This works fine, but I would like to make the file name to be 'exptn.txt', where n is a variable specified earlier in the script expt_no = n
In mathematica i could imput code in the following way.
"expt"<>expt_no<>".txt"
Can something similar be done in MATLAB or do I just have to change it manually each time?
This works fine, but I would like to make the file name to be 'exptn.txt', where n is a variable specified earlier in the script expt_no = n
In mathematica i could imput code in the following way.
"expt"<>expt_no<>".txt"
Can something similar be done in MATLAB or do I just have to change it manually each time?