The dimension equals 1 or 2, with values equaling column sorting or row sorting, respectively. The sort command can take in three arguments, and return two values: = sort(A,dimension,sort_order) Ī represents the unsorted array and is the one required argument. The function “sort” will allow you to order the columns or rows in the array A. Here are some tips for how to go about doing so. While you are often working with matrices (and vectors) in Matlab, you will come across situations where sorting the data will become a necessity.
0 Comments
Leave a Reply. |