Difference between revisions of "Kq2lin.m"

From Spinach Documentation Wiki
Jump to: navigation, search
m (Rename Arguments section heading to Parameters)
(Update function See also links and function index membership)
 
Line 27: Line 27:
  
 
==See also==
 
==See also==
* [[lin2kq.m]]
+
[[lin2kq.m]], [[serpentine.m]], [[st_product_table.m]], [[bos_product_table.m]], [[oper2bm.m]], [[enlev2bm.m]], [[autoexec.m]], [[fft_freq_axis.m]], [[fwhm2rlx.m]], [[icm2hz.m]], [[ifft_time_axis.m]], [[intrep.m]], [[istraceless.m]], [[kronm.m]], [[lcurve.m]], [[min_int_type.m]], [[prune_subgraphs.m]], [[redfield_integral_async.m]], [[redfield_integral_serial.m]], [[repcols.m]], [[reprows.m]], [[tikhol1n.m]], [[unihash.m]], [[which_subst.m]], [[xyz2hfc.m]], [[Kernel_utilities]]
* [[serpentine.m]]
 
* [[st_product_table.m]]
 
* [[bos_product_table.m]]
 
* [[oper2bm.m]]
 
* [[enlev2bm.m]]
 
  
 
''Version 2.11, authors: [[Ilya Kuprov]]''
 
''Version 2.11, authors: [[Ilya Kuprov]]''

Latest revision as of 19:38, 6 June 2026

Converts k,q indexing of matrices into their linear serpentine indexing. In base 1 indexing convention: (1,1)(1,2)(1,3) (1)(3)(6) (2,1)(2,2)(2,3) <=> (2)(5)(8) (3,1)(3,2)(3,3) (4)(7)(9) and in base 0 indexing convention: (0,0)(0,1)(0,2) (0)(2)(5) (1,0)(1,1)(1,2) <=> (1)(4)(7) (2,0)(2,1)(2,2) (3)(6)(8).

Syntax

                     I=kq2lin(N,K,Q,idx_base)

Parameters

            N   - matrix dimension, a scalar
            K   - first index, positive integer
                  array of any size
            Q   - second index, positive integer
                  array of the same size as K
       idx_base - indexing base, 0 or 1

Outputs

            I   - linear serpentine index, an ar-
                  ray of the same size as inputs

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

lin2kq.m, serpentine.m, st_product_table.m, bos_product_table.m, oper2bm.m, enlev2bm.m, autoexec.m, fft_freq_axis.m, fwhm2rlx.m, icm2hz.m, ifft_time_axis.m, intrep.m, istraceless.m, kronm.m, lcurve.m, min_int_type.m, prune_subgraphs.m, redfield_integral_async.m, redfield_integral_serial.m, repcols.m, reprows.m, tikhol1n.m, unihash.m, which_subst.m, xyz2hfc.m, Kernel_utilities

Version 2.11, authors: Ilya Kuprov