I have generated a large dataset. Now I need to draw random samples from it. How can I do this?
이전 댓글 표시
For simulation, I have to draw 1000 random samples from a large dataset. I am looking for some efficient way of doing this. Can anyone help, please?
채택된 답변
추가 답변 (1개)
Grzegorz Knor
2012년 11월 15일
For example:
data = exp(-(-10:0.1:10).^2);
idx = randperm(numel(data));
N = 20;
idx = idx(1:N);
plot(idx,data(idx),'o')
카테고리
도움말 센터 및 File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!