symrcm
Reverse Cuthill-McKee permutation.
📝Syntax
p = symrcm(S)
📥Input Arguments
Parameter Description
S a square sparse or full floating-point or logical matrix.
📤Output Arguments
Parameter Description
p row vector permutation.
📄Description

symrcm returns a Reverse Cuthill-McKee permutation computed from the symmetrized nonzero pattern of S.

The permutation can reduce matrix bandwidth before sparse factorizations or iterative solves.

Double, single, logical, complex double, and complex single square matrices are supported, both full and sparse. For sparse input, stored zero values are ignored when the graph pattern is built.

The returned permutation is a row vector of one-based indices. Applying S(p,p) reorders rows and columns consistently.

💡Examples
S = sparse([0 1 0 0; 1 0 1 0; 0 1 0 1; 0 0 1 0]);
p = symrcm(S)
S = sparse(single([0 1i; 0 0]));
p = symrcm(S)
🔗See Also
sparsebandwidth
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub