i want to make random size of my datasample.output must give random size array. As i am very new in matlab. please help.
古いコメントを表示
r=datasample('ATCG',20);
r =
TCACCAAAATCACAGGTATG
採用された回答
その他の回答 (1 件)
Jos (10584)
2015 年 3 月 2 日
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 件のコメント
Tonmoy saha
2015 年 3 月 2 日
編集済み: Tonmoy saha
2015 年 3 月 2 日
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!