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 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu QSP, PKPD, and Systems Biology finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!