Learn R Programming

FIACH (version 0.1.2)

matArr: Matrix to Array Transformation.

Description

This function creates a 4D/3D image array from a 2D matrix

Usage

matArr(mat,dim)

Arguments

mat
input must be a 2d matrix
dim
dimensions of array

Value

returns an array of dimension dim

Examples

Run this code

mat<-matrix(nrow=50,ncol=30*30*15)  
arr<-matArr(mat,dim=c(30,30,15,50))
dim(arr)

Run the code above in your browser using DataLab