i want to make random size of my datasample.output must give random size array. As i am very new in matlab. please help.
Afficher commentaires plus anciens
r=datasample('ATCG',20);
r =
TCACCAAAATCACAGGTATG
Réponse acceptée
Plus de réponses (1)
Jos (10584)
le 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 commentaire
Tonmoy saha
le 2 Mar 2015
Modifié(e) : Tonmoy saha
le 2 Mar 2015
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!