i want to make random size of my datasample.output must give random size array. As i am very new in matlab. please help.
Mostrar comentarios más antiguos
r=datasample('ATCG',20);
r =
TCACCAAAATCACAGGTATG
Respuesta aceptada
Más respuestas (1)
Jos (10584)
el 2 de Mzo. de 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 comentario
Tonmoy saha
el 2 de Mzo. de 2015
Editada: Tonmoy saha
el 2 de Mzo. de 2015
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!