Repeat resampling with replacement process several times
古いコメントを表示
Hello,
I have the below code for resampling with replacement.
res1 = [];
res2 = [];
% centerd matrix size:2X7
cen1=centered(1,:);
cen2=centered(2,:);
for j=1:7
res1_temp=cen1(randi(7,1));
res1= [res1 res1_temp];
%
res2_temp=cen2(7,1));
res2= [res2 res2_temp];
end
res_total=[res1; res2]; % 2X7
Now I have to repeat this process 170 times because centered matrix size is 170X7. That is, must have
re1=[];
res2=[];
.......
res170[];
......
res_total=[res1;res2,.....
res170];
and the res_total should be 170X7. How can I as easy as possible?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!