0
有點新的matlab在這裏,搜索csvwrite tutorial和一些現有的webportals有關我的問題找不到方法來傳遞我的變量的值輸出文件名稱,而在csv輸出時;提供我的bellow腳本,我想有輸出文件像output_$aa_$dd.csv
其中aa和dd分別是腳本的計數器的第一個和第二個。csvwrite循環中帶有編號的文件名在matlab
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
乾杯好友;)我想我不得不提及輸出的矩陣以及最後,對吧? 'fullfile('home','amir','amir_matlab',sprintf('%d_%d.csv',aa,bb),randMin)' – Amir
是的,作爲'csvwrite'的第二個參數。 – heriantolim