How can i change the positions of numbers in a matrix

1 Ansicht (letzte 30 Tage)
Omar Abbadi
Omar Abbadi am 3 Apr. 2020
Beantwortet: KALYAN ACHARJYA am 3 Apr. 2020
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?

Antworten (1)

KALYAN ACHARJYA
KALYAN ACHARJYA am 3 Apr. 2020
sort the matrix, you will get all rows at initails of rows numbers
sort(matrix)

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by