OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

r2m

Contents

Brief Information

Convert a range of worksheet data directly into a matrix

Command Line Usage

1. r2m irng:=[Book1]Sheet1!Col(1)[1]:Col(4)[5]

2. r2m irng:=[Book1]Sheet1!Col(1)[1]:Col(4)[5] om:=[MBook1]MSheet1!Mat(1)

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input irng

Input

Range

<active>

Specifies input data range

Output Matrix om

Output

MatrixObject

<new>

Specifies output matrix

See the syntax here.

Description

This function converts a range of worksheet data into matrix directly, and assigns the matrix coordinates automatically. More information about worksheet to matrix conversion, please refer to the help of w2m X-Function.

Examples

1. Import the file \Samples\Matrix Conversion and Gridding\DirectXY.dat.

2. Type the following script in command window:

r2m irng:=!Col(1)[1]:Col(4)[5];

After you executed the script, the appointed range of worksheet data was converted into matrix directly.

For more examples, please refer to XF Script Dialog (press F11).

Related X-Functions

m2v, w2m, wexpand2m