i want to make random size of my datasample.output must give random size array. As i am very new in matlab. please help.
Show older comments
r=datasample('ATCG',20);
r =
TCACCAAAATCACAGGTATG
Accepted Answer
More Answers (1)
Jos (10584)
on 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 Comment
Tonmoy saha
on 2 Mar 2015
Edited: Tonmoy saha
on 2 Mar 2015
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!