Take samples from the previous sample
显示 更早的评论
Hi all, I have set of data, the size doesn't really matter. Lets call it x1. I want to take a random set of values from x1 and lets call it x2. Then take random samples from x2 and call it x3. So on and so forth. I am not really sure how to do this, I have tried a couple of things, but without luck. Any help is appreciated. Also, I have access to the statistics library. The things that I have tried made use of the function randsample.
Thanks.
2 个评论
Azzi Abdelmalek
2015-8-10
Can you give more details? how many sample? when do you want to stop?
Ellie
2015-8-10
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2015-8-10
x=1:100
k=1;
out{k}=x
while numel(out{k})>10
n=numel(out{k});
idx=randperm(n-1);
out{k+1}=out{k}(idx);
k=k+1;
end
celldisp(out)
2 个评论
Ellie
2015-8-10
Azzi Abdelmalek
2015-8-10
the new samples have different sizes, you can't avoid cells. Why do you want to avoid cells?
类别
在 帮助中心 和 File Exchange 中查找有关 Stable Distribution 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!