Search

 

Module: Editor

Version: 5.1.4 +

Type: Long, Double, Date, Boolean or String

Category: Matrix

 

Description

The formula 'First' returns a matrix with the first n elements over the specified dimensions. The formula 'First' creates a new matrix existing from the first n 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.

n:                      the number of elements you want to select.

Example

Description

In the following example the formula 'First' is used to take the first row of a matrix.

Values parameters

Matrix:

Column1Column2Column3Column4
 2 4
 3

 

Dimension: 1

n: 1

Result

Matrix:
 
Column1Column2Column3Column4
 2 4 6 8

 

The result is a matrix with only the first row of the original matrix.

Related Topics

MidThe formula 'Mid' returns a matrix with the middle n elements over a specified dimension, starting by the specified parameter 'Start'.

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-08