Is it possible to obtain a random sample of values from a matrix without the randsample tool?
3 次查看(过去 30 天)
显示 更早的评论
Is it possible to obtain a random sample of values from a matrix without the randsample tool?
0 个评论
采纳的回答
Azzi Abdelmalek
2012-11-24
编辑:Azzi Abdelmalek
2012-11-24
A=magic(6);
out=A(randi(numel(A),1))
if you want 3 values for example
out=A(randi(numel(A),3,1))
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!