edit-selecting random values
显示 更早的评论
I have a 10x10 matrix,i need 3 x10 ,but the corresponging column values must not change
if u r selecting any elememt from ist row that corresponging column values must not change
采纳的回答
更多回答(1 个)
Walter Roberson
2012-1-13
It looks to me as if the answer should just be
p = randperm(size(A,1));
out = A(p(1:3),:);
类别
在 帮助中心 和 File Exchange 中查找有关 Sparse Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!