fabien van mook

all packages "fvm-*"

package "fvm-valuetocode"

function file "reshapefrom2d.m"

Function y = reshapefrom2d(n,x)

returns the multidimensional array y given the
two-dimensional array x. 

Output array y is shaped according to the vector of
number of elements per dimension, n. The number of
elements in the second dimension (i.e. n(2) or number of
columns) of x and y are assumed to be equal; therefore,
the number of elements in the first dimension (i.e. number
of rows) in x equals to prod([n(1),n(3:length(n))]).

The array x may be a numeric matrix or a cell-array.
Output array y will be of the same type.

See also m-file reshapeto2d.m for the reverse operation.


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-valuetocode" under GNU GPLv3+