How can I run the datasample function 500 times and record each output within a cell array?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a matrix size 101x8 and would like to randomly sample that data 500 times.
My code for sampling and replacing is below. I would like to have Y be a cell array with 500 randomly sampled matrices. Thank you for your help.
Y = datasample(EMG,size(EMG,1))
댓글 수: 0
채택된 답변
Jan
2022년 11월 11일
Result = zeros([size(EMG), 500]);
for k = 1:500
Result(:, :, k) = datasample(EMG,size(EMG,1));
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 NaNs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!