Unfoldm: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
 
imported>Jeremy
(Importing text file)
Line 1: Line 1:
===Purpose===
===Purpose===
Unfolds an augmented matrix for MPCA.
Unfolds an augmented matrix for MPCA.
===Synopsis===
===Synopsis===
:xmpca = unfoldm(xaug,nsamp)
:xmpca = unfoldm(xaug,nsamp)
===Description===
===Description===
UNFOLDM unfolds the input matrix xaug to create a matrix of unfolded row vectors xmpca for MPCA. xaug contains nsamp matrices '''A'''j augmented such that [xaug] = [A1; A2; ...; Ansamp]. For example, for xaug of size (nsamp\*m by n) each matrix '''A'''j is of size m by n. For '''A'''j each m by 1 column ai is transposed and augmented such that [bj] = [a1', a2', ..., an'] and [xmpca] = [b1; b2; ...; bnsamp]. Note: the '''A'''j should all be the same size.
UNFOLDM unfolds the input matrix xaug to create a matrix of unfolded row vectors xmpca for MPCA. xaug contains nsamp matrices '''A'''j augmented such that [xaug] = [A1; A2; ...; Ansamp]. For example, for xaug of size (nsamp\*m by n) each matrix '''A'''j is of size m by n. For '''A'''j each m by 1 column ai is transposed and augmented such that [bj] = [a1', a2', ..., an'] and [xmpca] = [b1; b2; ...; bnsamp]. Note: the '''A'''j should all be the same size.
===Examples===
===Examples===
a = [1    2    3
a = [1    2    3
:    4    5    6
:    4    5    6
:    -1    -2    -3
:    -1    -2    -3
:    -4    -5    -6]
:    -4    -5    -6]
xmpca = unfoldm(a,2)
xmpca = unfoldm(a,2)
xmpca = [1    4    2    5    3    6
xmpca = [1    4    2    5    3    6
         -1    -4    -2    -5    -3    -6]
         -1    -4    -2    -5    -3    -6]
===See Also===
===See Also===
[[gscale]], [[mpca]], [[pca]], [[reshape]]
[[gscale]], [[mpca]], [[pca]], [[reshape]]

Revision as of 15:27, 3 September 2008

Purpose

Unfolds an augmented matrix for MPCA.

Synopsis

xmpca = unfoldm(xaug,nsamp)

Description

UNFOLDM unfolds the input matrix xaug to create a matrix of unfolded row vectors xmpca for MPCA. xaug contains nsamp matrices Aj augmented such that [xaug] = [A1; A2; ...; Ansamp]. For example, for xaug of size (nsamp\*m by n) each matrix Aj is of size m by n. For Aj each m by 1 column ai is transposed and augmented such that [bj] = [a1', a2', ..., an'] and [xmpca] = [b1; b2; ...; bnsamp]. Note: the Aj should all be the same size.

Examples

a = [1 2 3

4 5 6
-1 -2 -3
-4 -5 -6]

xmpca = unfoldm(a,2)

xmpca = [1 4 2 5 3 6

       -1    -4    -2    -5    -3    -6]

See Also

gscale, mpca, pca, reshape