random pick cell array
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
how to randomly picking in cell array? for example,i want to pick randomly one data in x.
x=[1;8;9;10;16]
0 Commenti
Risposte (1)
Paulo Silva
il 7 Mag 2011
x=[1;8;9;10;16]; %is one array not cell array
x(randi([1 numel(x)])) %show one random element of the array
0 Commenti
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!