m2a {lazy.mat}R Documentation

Convert supermatrix to array

Description

Convert supermatrix to array

Usage

m2a(M, method = 1, n3 = 0)

Arguments

M

Input supermatrix

method

= 1 when M is a horizontally stacked supermatrix
= 2 when M is a vertically stacked supermatrix

n3

# of third dimensions when M does not have SMdim attribute.

Details

The size of the supermatrix M must be
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

an array of n1 x n2 x n3

Examples

m2a(demomat(4,3,2,supermat=1))
m2a(demomat(4,3,2,supermat=2))

[Package lazy.mat version 0.1.3 Index]