您好,我正在尝试找到一种方法将2个变量从我的工作区保存到文件中.我希望使用原始日期和当前日期将文件名放在一起.
我只想要变量的最大值,所以:
max(streaking)
Run Code Online (Sandbox Code Playgroud)
和
max(tap_total)
Run Code Online (Sandbox Code Playgroud)
原始文件名是:
3_FM001_02_05460 $ bandp指向$ 64_24000_FWD_1x1_PRI_PRI_PRI_PRI_15_17_ActivePixelMeans.csv
我想要使用的原始文件名的唯一部分是:
3_FM001_02_05460$BandP$64_24000_FWD_1x1
Run Code Online (Sandbox Code Playgroud)
这些可以保存在文本文件或电子表格中,没关系.
新文件名的示例如下所示:
3_FM001_02_05460$BandP$64_24000_FWD_1x1_7-26-2012
Run Code Online (Sandbox Code Playgroud)
也,
如果可以在文件中执行某些操作以显示哪个变量,例如:
Streaking: 1.272 % this would come from the variable max(streaking)
Tap_Total: 2.252 % this would come from the varaible max(tap_total)
Run Code Online (Sandbox Code Playgroud)
编辑:
% Construct a questdlg with three options
choice = questdlg('Would you like to save?', ...
'Save Options', ...
'Yes','No','Cancel','Cancel');
% Handle response
switch choice
case 'Yes'
disp([choice ' processing.'])
save_option = 1;
case 'No'
disp([choice ' processing.'])
save_option = 0;
case 'Cancel' …Run Code Online (Sandbox Code Playgroud)