select random row inside the cell
古いコメントを表示
A={[1,4,6;6,5,4;1,2,4],[1,3;5,4],[1,2;1,7;6,8]};
number_of_choosen_row=1;
choosen_row=cellfun( @(m) datasample( m,number_of_choosen_row,'replace',false ), A, 'uni',false);
I want to chose random row inside a cell. but above code does not give me correct result.
for example result should be choosen_row={[3],[1],[1]}
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Curve Fitting Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!