REGION

Purpose:

Extracts a rectangular region from a table.

Syntax:

REGION(table, row, rowlen, col, collen, nopad)

table

-

Any series or multi-column table.

row

-

An integer. Number of first row of data to copy.

rowlen

-

An integer. Number of rows to copy. If nopad = 0, the rows are padded with zeros as needed.

col

-

An integer. Number of first column of data to copy.

collen

-

An integer. Number of columns to copy. If nopad = 0, the columns are padded with zeros as needed.

nopad

-

Optional. An integer, the zero padding flag. 0: pad with zeros; 1: do not pad with zeros. Defaults to 0.

Returns:

A table.

Example:

W1: {{ 2, 4,   6,  8},

     { 8, 10, 12, 14}, 

     {14, 16, 18, 20}} 

 

region(W1, 3, 1, 2, 2)

 

returns the table: {{16, 18}}

See Also:

EXTRACT

MACROS in matrix.mac

RAVEL

READTABLE

RESHAPE