|
IDL Analyst Reference Guide: Math and Statistics Utilities |
|
The RM procedure performs formatted input of arrays using the standard linear algebraic convention: "row" refers to the first index of the array and "column" refers to the second. By contrast, simply defining an array at the IDL command line creates an array the standard image processing convention: "column" refers to the first index of the array and "row" refers to the second.
The RM procedure is used extensively in the examples in the IDL Analyst Reference Guide. For multidimensional arrays, defining an array interactively using RM is equivalent to defining the same array using normal IDL syntax and then transposing the array.
RM, Array, Rows, Columns
A named variable that will contain the array.
An integer specifying the number of rows in the array.
An integer specifying the number of columns in the array.
| Note If the user enters more data than will fit in the specified number of columns, the extra data is discarded. |
None
Define a 3 row by 2 column array:
RM, arr, 3, 2
IDL prompts for input;
row 0: 1,4 row 1: 6,3 row 2: 9,9
Display the array using PM:
PM, arr
IDL Prints:
1.00000 4.00000 6.00000 3.00000 9.00000 9.00000
Display the array using PRINT:
PRINT, arr
IDL Prints: