The RM procedure within IMSL 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, 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 IMSL routines. 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.
This routine requires an IDL Advanced Math and Stats license. For more information, contact your sales or technical support representative.
Examples
Example 1
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:
1.00000 6.00000 9.00000
4.00000 3.00000 9.00000
Syntax
RM, Array, Rows, Columns
Return Value
None
Arguments
Array
A named variable that will contain the array.
Rows
An integer specifying the number of rows in the array.
Columns
An integer specifying the number of columns in the array. If you enter more data than will fit in the specified number of columns, the extra data is discarded.
Keywords
None
Version History
See Also
PM