issorted
📝 Syntax
📥 Input argument
📤 Output argument
📄 Description
💡 Example
🔗 See also
🕔 History
Version
📄 Description
Last updated
Last updated
x = [1 2 3 4];
issorted(x) % returns true
x = [1 3 2 4];
issorted(x) % returns false
% Check if a matrix is sorted by rows
A = [1 2 3; 4 5 6; 7 8 9];
issorted(A, 'rows') % returns true
A = [1 2 3; 7 8 9; 4 5 6];
issorted(A, 'rows') % returns false