对 matlab 来说有点新,搜索csvwrite 教程和一些关于我的问题的现有网络门户找不到在导出 csv 时将我的变量按值传递给输出文件名的方法;提供我的波纹管脚本,我希望输出文件类似于output_$aa_$dd.csv
aa 和 dd 分别是脚本计数器的第一个和第二个。
for aa=1:27
for dd=1:5
M_Normal=bench(aa,dd).Y;
for j=1:300
randRand=M_Normal(randperm(12000,12000));
for jj = 1:numel(randMin(:,1)); % loops over the rand numbers
vv= randMin(jj,1); % gets the value
randMin(jj,j+1)=min(randRand(1:vv)); % get and store the min of the selction in the matix
end
end
csvwrite('/home/amir/amir_matlab/sprintf(''%d%d',aa, bb).csv',randMin);
end
end