i want to make random size of my datasample.output must give random size array. As i am very new in matlab. please help.
Mostra commenti meno recenti
r=datasample('ATCG',20);
r =
TCACCAAAATCACAGGTATG
Risposta accettata
Più risposte (1)
Jos (10584)
il 2 Mar 2015
you want a random size sample? Like this, perhaps:
DATA = 'ATCG'
K = randi([10 20],1) % random number between 10 and 20
Y = datasample(DATA,K)
1 Commento
Tonmoy saha
il 2 Mar 2015
Modificato: Tonmoy saha
il 2 Mar 2015
Categorie
Scopri di più su Matrix Indexing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!