Skip to content
This repository was archived by the owner on May 21, 2020. It is now read-only.
Florian Rappl edited this page Dec 21, 2014 · 2 revisions

sort

Sorts the columns of a given matrix or the complete vector.

sort(M)

Gives back the sorted columns of the passed matrix. The sorting is done from the lowest to the highest number, i.e. in ascending order.

Argument M

Matrix

Returns 1. entry

Matrix

Example

sort([1, 2, 0, 9, 5])

Sorts the vector [1, 2, 0, 9, 5], resulting in [0, 1, 2, 5, 9].

Example

sort([1, 2, 0, 9, 5; 10, 8, 4, 6, 1])

Sorts the matrix [1, 2, 0, 9, 5; 10, 8, 4, 6, 1], resulting in [0, 1, 2, 5, 9; 1, 4, 6, 8, 10].

Clone this wiki locally