I want to do bootstrap analysis by using 20*1 matrix.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Chris
am 26 Okt. 2022
Beantwortet: the cyclist
am 27 Okt. 2022
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 Kommentare
Akzeptierte Antwort
the cyclist
am 27 Okt. 2022
One way is
% Pretend input data
M = rand(20,1);
idx = randi(20,500,1);
samples = M(idx);
0 Kommentare
Weitere Antworten (1)
the cyclist
am 27 Okt. 2022
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 Kommentare
Siehe auch
Kategorien
Mehr zu Descriptive Statistics and Visualization finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!