# 2.2.31 v2m

## Brief Information

Convert a vector to matrix

## Command Line Usage

 1. v2m ix:=col(1) method:=v2row index:=3 om:=[Mbook1]1!1; 

2. v2m ix:=col(1) method:=v2m direction:=col om:=[Mbook1]1!1; 

## Variables

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

Input

vector

<active>

Specifies the input vector.

Method method

Input

int

v2col

Specifies the method to convert the vector
Option list

• v2col:Copy Vector to a Column of Matrix
Copies the input vector to a column of the output matrix, where the column index is specified by the index variable.
• v2row:Copy Vector to a Row of Matrix
Copies the input vector to a row of the output matrix, where the row index is specified by the index variable.
• v2m:Copy Vector to Whole Matrix
Uses the vector to fill the whole matrix
Index index

Input

int

1

This variable is available only when the method variable is set to either Copy Vector to a Column of Matrix or Copy Vector to a Row of Matrix. It specifies the index of the column/row which the input vector will be copied to.

Direction direction

Input

int

row

This variable is available only when the method variable is set to Copy Vector to Whole Matrix. It specifies the direction for filling the matrix elements.
Option list

• row:By Row
Fills the matrix row by row.
• col: By Column
Fills the matrix column by column.
Output Matrix om

Output

MatrixObject

<new>

Specifies the output matrix, which will be filled with the vector elements.

See the syntax here.

## Description

This function converts a vector to matrix.