MathWorks
mathworks.com › matlab › data import and analysis › data preprocessing
sort - Sort array elements - MATLAB
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment. The sort function fully supports GPU arrays. To run the function on a GPU, specify the input data as a gpuArray (Parallel Computing Toolbox).
MathWorks
mathworks.com › symbolic math toolbox › mathematics › linear algebra
sort - Sort elements of symbolic arrays - MATLAB
Y = sort(X) sorts the elements of X in the default ascending order.
Videos
15:10
Using the Sort and Sortrows Functions in MATLAB - YouTube
Matlab: Sorting - YouTube
03:26
MATLAB sort Function Explained with Examples | Learn Data Sorting ...
MATLAB BASICS: Sorting Vectors and Arrays
07:32
Sorting Algorithms: Insertion Sort (MATLAB) - YouTube
05:42
Sorting Matrix Values in MATLAB | Sorting in Matlab | Matrix Sorting ...
MathWorks
mathworks.com › matlab › data import and analysis › data preprocessing
sortrows - Sort rows of matrix or table - MATLAB
This MATLAB function sorts the rows of an array based on the elements in the first column.
MathWorks
mathworks.com › fixed-point designer › data type exploration › fixed-point specification › fixed-point specification in matlab › fixed-point math functions
sort - Sort elements of real-valued fi object in ascending or descending order - MATLAB
Example: If A is a 2-by-3 matrix, then [B,I] = sort(A,2) sorts the elements in each row of A. The output I is a collection of 1-by-3 row index vectors describing the rearrangement of each row of A. ... The dimensions argument must be a built-in type; it cannot be a fi object. ... Run the command by entering it in the MATLAB Command Window.
MathWorks
mathworks.com › matlabcentral › answers › 217577-how-to-get-sorted-index-order-for-an-array
How to get sorted index order for an array? - MATLAB Answers - MATLAB Central
May 19, 2015 - For example, if I use the sort function on the array [14 8 91 19], I will get [8 14 19 91]. But instead I want [2 1 4 3] which gives me the indices of elements in the original array. Is there a...
Johns Hopkins University
math.jhu.edu › ~shiffman › 370 › help › techdoc › ref › sort.html
sort (MATLAB Function Reference)
If A is a matrix, sort(A) treats the columns of A as vectors, returning sorted columns. If A is a multidimensional array, sort(A) treats the values along the first non-singleton dimension as vectors, returning an array of sorted vectors. [B,INDEX] = sort(A) also returns an array of indices.
MathWorks
mathworks.com › matlab › graphics › 2-d and 3-d plots › data distribution plots
sorty - Sort elements in heatmap column - MATLAB
This MATLAB function displays the elements in column in ascending order (from top to bottom).
MathWorks
mathworks.com › matlabcentral › answers › 1639970-sort-matlab-table-based-on-pre-defined-order
Sort Matlab table based on pre-defined order - MATLAB Answers - MATLAB Central
January 31, 2022 - For col2 I would like to use a custom order that is neither ascend nor descend. So for instance the sorting order should be: ... Sign in to comment. Sign in to answer this question. ... https://www.mathworks.com/matlabcentral/answers/1639970-sort-matlab-table-based-on-pre-defined-order#answer_885670
MathWorks
mathworks.com › matlabcentral › answers › 1865988-sorting-a-matrix-based-on-another-matrix
Sorting a matrix based on another matrix - MATLAB Answers - MATLAB Central
November 28, 2022 - The code sorts DRIVER_DATA exactly as you did, obtains the sort index, and uses that index to sort the rows of DRIVER_NAMES. Indexing is one of MATLAB's super powers, you need to learn how to use it.
MathWorks
mathworks.com › matlab › graphics › 2-d and 3-d plots › data distribution plots
sortx - Sort elements in heatmap row - MATLAB
This MATLAB function displays the elements in row in ascending order (from left to right).
MathWorks
mathworks.com › bioinformatics toolbox › microarray analysis › data import and management
sortcols - Sort columns of DataMatrix in ascending or descending order - MATLAB
DMObjNew = sortcols(DMObj1) sorts the columns in DMObj1 in the ascending order based on the elements in the first row.
MathWorks
mathworks.com › matlabcentral › answers › 2137618-how-to-use-sort-to-sort-an-array-of-custom-class-objects-in-matlab
How to Use sort to Sort an Array of Custom Class Objects in MATLAB? - MATLAB Answers - MATLAB Central
July 16, 2024 - Incorrect number or types of inputs or outputs for function sort. ... https://www.mathworks.com/matlabcentral/answers/2137618-how-to-use-sort-to-sort-an-array-of-custom-class-objects-in-matlab#comment_3212363
MathWorks
mathworks.com › matlabcentral › answers › 523444-sorting-an-array-in-matlab
Sorting an array in matlab - MATLAB Answers - MATLAB Central
May 6, 2020 - B = sort(___,direction) returns sorted elements of A in the order specified by direction using any of the previous syntaxes.
MathWorks
mathworks.com › matlabcentral › answers › 1578250-sorting-rows-by-a-specific-value
Sorting rows by a specific value - MATLAB Answers - MATLAB Central
November 3, 2021 - Option 2 - turn your month variable into a categorical, and define a category order using either the 'Ordinal',true name value pair or reordercats function. You can then sort using sortrows, ... https://www.mathworks.com/matlabcentral/answers/1578250-sorting-rows-by-a-specific-value#comment_1828494
MathWorks
mathworks.com › dsp system toolbox › statistics and linear algebra › measurements and statistics
Sort - Sort input elements by value - Simulink
The block computes the magnitude by taking the sum of the squares of the real and imaginary components of the complex input. This is identical to calling the sort function as [Val,I] = sort(u,...,'ComparisonMethod','abs'). ... Generated code relies on the memcpy or memset function (string.h) under certain conditions. ... Run the command by entering it in the MATLAB Command Window.