I want to do bootstrap analysis by using 20*1 matrix.
조회 수: 1 (최근 30일)
이전 댓글 표시
I want to draw 500 samples from the 20*1 matrix (20 pairs of observations).
In this case, what codes do I have to use?
댓글 수: 0
채택된 답변
the cyclist
2022년 10월 27일
One way is
% Pretend input data
M = rand(20,1);
idx = randi(20,500,1);
samples = M(idx);
댓글 수: 0
추가 답변 (1개)
the cyclist
2022년 10월 27일
If you have the Statistics and Machine Learning Toolbox, you can do
% Pretend input data
M = rand(20,1);
samples = randsample(M,500,true);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Hypothesis Tests에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!