This code give me 20 subsample. But i want no of subsamples that cover only the main sample.Means program may give 6 or 10 or any no of subsample but when it cover the whol sample it will stop executing. Any suggession please help me.
5 views (last 30 days)
Show older comments
sample=datasample('ATCG',20);
display(sample);
i=1;
for k= 1:numel(sample)
subsamplelength = randi([5 10]);
subsamplestart = randi(numel(sample)-subsamplelength+1);
subsample{i}= sample(subsamplestart : subsamplestart+subsamplelength-1);
i=i+1;
end
display(subsample);
0 Comments
Answers (0)
See Also
Categories
Find more on QSP, PKPD, and Systems Biology in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!