Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Matrix Manipulation
Topic: Sorting and Counting
See also: {} reduce vec

Function: reshape
Description: reshape transforms an array into a new one with given dimensions.

Usage: y = reshape(x,d)
Input:
x multidimensional array (or string)
d vector containing the new dimensions
Output:
y array, witch has the dimension d

Note:

Example:
x=1:20
reshape(x,#(2,5,2))

Result:
Contents of reshape

[,,1,1,1,1,1,1]
[1,]     1     3     5     7     9
[2,]     2     4     6     8    10

[,,2,1,1,1,1,1]
[1,]    11    13    15    17    19
[2,]    12    14    16    18    20



(C) MD*TECH Method and Data Technologies, 05.02.2006