2.2.2.21 mtranspose

Menu Information

Matrix: Transpose

Brief Information

Transpose the active matrix

Command Line Usage

1. mtranspose

2. mtranspose im:=[MBook1]MSheet1!Mat(1)

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

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

Input

MatrixObject

<active>

Specifies the input matrix.

Output Matrix om

Output

MatrixObject

<input>

Specifies the output matrix.

See the syntax here.

Description

This X-Function exchanges the matrix columns with rows, and rows with columns.

Examples

  • Code Sample
/*
This example shows how transpose a matrix.
The sample data is exe_path\Samples\Matrix Conversion and Gridding\Direct.dat
1. Load matrix data.
2. Transpose and create a new matrix
*/
// Get sample data
fn$ = system.path.program$ + "Samples\Matrix Conversion and Gridding\Direct.dat";
window -t matrix origin;
impASC fn$;

// Transpose matrix
mtranspose om:=<new>;

Related X-Functions

m2w, w2m