RM

Syntax | Arguments | Keywords | Example | Version History

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 Advanced Math and Stats. 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.

Syntax

RM, Array, Rows, Columns

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.

Note
If the user enters more data than will fit in the specified number of columns, the extra data is discarded.

Keywords

None

Example

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 

Version History

6.4

Introduced