lin2kq.m

From Spinach Documentation Wiki
Revision as of 21:30, 22 February 2026 by Kuprov (talk | contribs)
Jump to: navigation, search

Converts linear serpentine indexing of matrices into their k,q indexing.

Syntax

                   [K,Q]=lin2kq(N,I,idx_base)

Arguments

            N   - matrix dimension
            I   - linear serpentine indices, an
                  array of integers
       idx_base - indexing base, 0 or 1

Outputs

            K   - row indices, an array of the
                  same size as I
            Q   - col indices, an array of the
                  same size as I

Examples

See examples in the Spinach distribution relevant to this function.

Notes

This page was generated from the function header in the Spinach repository.

See also


Version 2.11, authors: Ilya Kuprov