How can i change the positions of numbers in a matrix
1 次查看(过去 30 天)
显示 更早的评论
I have a 100x7 matrix consisting of random numbers between 0 and 0.5
How can i change the positions of the numbers so that all the zeros are together?
0 个评论
回答(1 个)
KALYAN ACHARJYA
2020-4-3
sort the matrix, you will get all rows at initails of rows numbers
sort(matrix)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!