2.2.2.10 mtranspose

Menu Information

Matrix: Transpose

Brief Information

Transpose the active matrix

Command Line Usage

1. mtranspose

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

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