How can i change the positions of numbers in a matrix

조회 수: 1 (최근 30일)
Omar Abbadi
Omar Abbadi 2020년 4월 3일
답변: KALYAN ACHARJYA 2020년 4월 3일
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?

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 4월 3일
sort the matrix, you will get all rows at initails of rows numbers
sort(matrix)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by