Lm2lin.m

From Spinach Documentation Wiki
Revision as of 16:53, 8 December 2015 by Admin (talk | contribs) (Created page with "Converts L,M spin state specification to linear indexing specification. In the linear indexing convention, the states are listed in the order of inc reasing L rank, and, with...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Converts L,M spin state specification to linear indexing specification. In the linear indexing convention, the states are listed in the order of inc reasing L rank, and, within ranks, in the order of decreasing M pro- jection. Syntax: I=lm2lin(L,M)

WARNING - zero base indexing, that is:

                          (L=0,M=0) -> I=0
                          (L=1,M=1) -> I=1
                          (L=1,M=0) -> I=2, et cetera...

Arrays of any dimension are accepted as arguments.