Mv2Mh {lazy.mat}R Documentation

Convert a vertically stacked supermatrix to a horizontally stacked one.

Description

Convert a vertically stacked supermatrix to a horizontally stacked one.

Usage

Mv2Mh(Mv, d1, d2, d3)

Arguments

Mv

Input vertically stacked supermatrix with SMdim attribute.
When SMdim attributes is NULL, the following three must be geven.

d1

# of first dimension (rows)

d2

# of second dimension (cols)

d3

# of matrices

Details

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.

See the description section of supermat funcion for the details.

Value

a d1 x (d3 x d2) horizontally stacked supermatrix

Examples

A <- demomat(2,3,4, rnroot="R", cnroot="C")
Mh <- a2m(A)
Mv <- a2m(A,method=2)

MvfMh <- Mh2Mv(Mh)
identical(Mv,MvfMh)
MhfMv <- Mv2Mh(Mv)
identical(Mh,MhfMv)

attributes(Mh)
attributes(MhfMv)
attributes(Mv)
attributes(MvfMh)


[Package lazy.mat version 0.1.4 Index]