Constructing saved file name with variables from code
1 ビュー (過去 30 日間)
I currently have a save command which labels the saved files with a static name which I change each time
If I have variables such as:
k = 1:10
How can I code this so each file name takes this information for the name,
i.e something like
Test_File %datestr(now,30) plus the others.
Thanks for your help!
回答 (2 件)
Renato Agurto 2016 年 3 月 17 日
Do you meansomething like this?
ext = '.mat'; %or .cvs, .xlsx, ...
file_name = ['Test_File_' datestr(now,30) '_' num2str(k) '_' num2str(I) ext];