Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Loops 为for循环中的每个迭代导出不同的excel(为每个迭代存储不同的矩阵)_Loops_For Loop_Export_Iteration_Store - Fatal编程技术网

Loops 为for循环中的每个迭代导出不同的excel(为每个迭代存储不同的矩阵)

Loops 为for循环中的每个迭代导出不同的excel(为每个迭代存储不同的矩阵),loops,for-loop,export,iteration,store,Loops,For Loop,Export,Iteration,Store,我想导出for循环中每个迭代的excel文件,或者为每个迭代存储不同的矩阵 我在代码中使用的是 ##code for s=10:10:100 'my code for make a specific scope from raw data' ... % result is the storage space numData=size('from the scope'); result=zeros(numData,25); %calculate within the scope

我想导出for循环中每个迭代的excel文件,或者为每个迭代存储不同的矩阵

我在代码中使用的是

  ##code  
for s=10:10:100
  'my code for make a specific scope from raw data'
  ...
% result is the storage space
numData=size('from the scope');
result=zeros(numData,25); 
%calculate within the scope
  for i=1:numData
  data_new_x = Scope(:,i);
  data_mean_x=mean(data_new_x); %mean x
  result(i,1)=data_mean_x;
  ...
  end
end
因此,通过改变变量s,输出矩阵result将不同。我想为每个迭代存储这些结果

如果你有解决这个问题的好办法,请告诉我