How can i change the positions of numbers in a matrix

1 visualización (últimos 30 días)
Omar Abbadi
Omar Abbadi el 3 de Abr. de 2020
Respondida: KALYAN ACHARJYA el 3 de Abr. de 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?

Respuestas (1)

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

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by