annotate toolboxes/FullBNT-1.0.7/KPMtools/subv2indTest.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function ndx = subv2indTest(siz,sub)
Daniel@0 2 %SUBV2IND Linear index from subscript vector.
Daniel@0 3 % SUBV2IND(SIZ,SUB) returns an equivalent single index corresponding to a
Daniel@0 4 % subscript vector for an array of size SIZ.
Daniel@0 5 % If SUB is a matrix, with subscript vectors as rows, then the result is a
Daniel@0 6 % column vector.
Daniel@0 7 %
Daniel@0 8 % This is the opposite of IND2SUBV, so that
Daniel@0 9 % SUBV2IND(SIZ,IND2SUBV(SIZ,IND)) == IND.
Daniel@0 10 %
Daniel@0 11 % See also IND2SUBV, SUB2IND.
Daniel@0 12
Daniel@0 13 ndx = subv2indMinka(siz,sub);
Daniel@0 14 ndx2 = subv2indKPM(siz,sub);
Daniel@0 15 assert(isequalKPM(ndx,ndx2))