Owning Palette: Array VIs and Functions
Requires: Base Development System
Changes the dimensions of an array according to the values of dimension size 0..m-1.
This function reads the array data in memory from left to right, row by row and populates the reshaped array the same way. For example, if you pass a 2D array of 8 elements, 2 columns of {0,1,2, 3}, to this function with two dimensions defined with sizes of 2 and 4, respectively, the function returns an array containing {{0,0,1,1}, {2,2, 3, 3}}. The connector pane displays the default data types for this polymorphic function.
Add to the block diagram | Find on the palette |
This function adjusts the array data in memory according to the reshaped array dimensions. This function pads or truncates the data if necessary. For example, if you pass a 1D array with 9 elements {0, 1, 2, 3, 4, 5, 6, 7, 8} to this function with two dimensions defined with sizes of 2 and 3, respectively, the function returns a 2D array containing {{0, 1, 2}, {3, 4, 5}}. The function truncates the last three input elements because the output array has room for only six values.
Resize this function to increase the number of dimension size parameters. m-dim array has one dimension for each dimension size input. For example, you can use this function to change a 1D array into a 2D array or vice versa. You also can use it to increase and decrease the size of a 1D array.