a2m {lazy.mat}R Documentation

Convert array to supermatrix

Description

Convert array to supermatrix

Usage

a2m(A, method = 1)

Arguments

A

Input array of n1 x n2 x n3

method

= 1 to create horizontally stacked supermatrix = 2 to create vertically stacked supermatrix

Details

The size of the supermatrix is
method = 1: n1 x (n3 x n2)
method = 2: (n3 x n1) x n2

About SMdim attribute:
SMdim attribute of a supermatrix is a list of the form (nrows=, ncols=) where
nrows is a vector of rows of each submatrix,
ncols is a vector of columns of each submatrix.

Value

a supermatrix with SMdim attribute.

Examples

a2m(demomat(4,3,2))
a2m(demomat(4,3,2), method=2)

[Package lazy.mat version 0.1.4 Index]