Learn R Programming

BaTFLED3D (version 0.2.11)

mult_3d: Multiply three matrices (or vectors) through a given core tensor to form a three dimensional tensor.

Description

The package 'rTensor' is required and the number of columns of x, y and z must match the dimensions of core.

Usage

mult_3d(core, x, y, z, names = T)

Arguments

core

array

x

matrix to multiply by the first mode of core

y

matrix to multiply by the second mode of core

z

matrix to multiply by the third mode of core

names

logical indicating whether to keep the dimension names

Value

Array with sizes given by the number of rows in x, y and z

Examples

Run this code
# NOT RUN {
mult_3d(array(1:24, dim=c(2,3,4)), matrix(1:4,2,2), matrix(1:6,2,3), matrix(1:8,2,4))
# }

Run the code above in your browser using DataLab