Search

 

Module: Editor

Version: 5.2.0 +

Type: Long, Double, Date, Boolean or String

Category: Matrix

 

Description

The formula 'Mid' returns a matrix with the middle n elements over a specified dimension, starting by the specified parameter 'Start'. The formula 'Mid' creates a new matrix existing from the selected rows or columns of a matrix.

Parameters

Matrix:               the matrix you want to take a selection of.

Dimension:         the dimension you want to take a selection of. 1 means rows, 2 means columns.

Start:                 is the start index, first row or column is 0

n:                      the number of rows or columns you want to select.

Example

Description

In the following example the formula 'Mid' is used to take the middle two columns of a matrix.

Values parameters

Matrix:

Column1Column2Column3Column4
 2  6  10  14
 3  7  11  15
 4  8  12  16
 5  9  13  17

 

Dimension: 2

Start: 1

n: 2

Result

Matrix:
 
Column1Column2
 6  10
 7  11
 8  12
 9  13

 

The result is a matrix with the two middle columns of the original matrix.

Related Topics

FirstThe formula 'First' returns a matrix with the first n elements over the specified dimensions.

LastThe formula 'Last' returns a matrix with the last n elements over the specified dimensions.

Feedback

If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.

Updated: 2014-09-16