Repeat resampling with replacement process several times
1 view (last 30 days)
Show older comments
stelios loizidis
on 21 Nov 2022
Commented: stelios loizidis
on 21 Nov 2022
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 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!