Resize
From Eigenvector Documentation Wiki
Contents |
Purpose
Resizes arguments to the same length.
Synopsis
- (newx,newv1,newv2,...) = resize(x,v1,v2,...);
Description
The function will attempt to resize all inputs to the largest size of each dimension for any given input. If input is a scalar, the function will return that scalar.
Inputs x and v1, v2,... can be scalars, vectors, matrices, or multidimensional arrays.
Inputs
- x and v1,v2... = input arrays to be resized
Outputs
- newx and newv1,newv2... = corresponding output arrays, after resizing
Examples
There are four input arrays, with the following sizes:
- x = 2x2x2
- v1 = 2x6
- v2 = 4x1
- v3 = 1x1
By executing the following command,
- (newx,newv1,newv2,newv3) = resize(x,v1,v2,v3);
The sizes of the NEW arrays will be:
- x = 4x6x2
- v1 = 4x6x2
- v2 = 4x6x2
- v3 = 1x1