powered by
Performing to multi-dimensional arrays tensor unfolding, also known as matricization
unfold(ten, k)
A matrix
A multi-dimensional array.
An integer specifying the mode of array to unfold.
unfold(array(1:24, dim=c(3,4,2)), 2);
Run the code above in your browser using DataLab