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 ビュー (過去 30 日間)
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 件)

カテゴリ

Help Center および File ExchangeQSP, PKPD, and Systems Biology についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by