reshape
Reshape an array.
(u)=reshape(a, newsize)
Inputs
a Any array.
newsize An array of positive integers specifying the size of the reshaped array.
Outputs
u The reshaped array.


Description
If the number of elements in the resized array exceed the number of elements in the input, the remaining elements of the output are set to zero.
Example
>>a=rand(2,3)
>>a
    0.3453    0.7246    0.8844
    0.4226    0.1688    0.1563

>>reshape(a,[4 5])
    0.3453    0.8844         0         0         0
    0.4226    0.1563         0         0         0
    0.7246         0         0         0         0
    0.1688         0         0         0         0

>>a=rand(4,5)
>>a
    0.1743    0.5634    0.0973    0.1612    0.6340
    0.5280    0.0286    0.5567    0.5974    0.4884
    0.9053    0.0410    0.4606    0.3946    0.8002
    0.3294    0.6613    0.7325    0.7051    0.5315

>>reshape(a,[2 3])
    0.1743    0.9053    0.5634
    0.5280    0.3294    0.0286