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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 QSP, PKPD, and Systems Biology에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!