Search

 

Module: Editor

Version: 5.1.4 +

Type: Long, Double, Date, Boolean or String

Category: Matrix

 

Description

The formula 'Last' returns a matrix with the last n elements over the specified dimensions. The formula 'Last' creates a new matrix existing from the last 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 'Last' is used to take the last two columns of a matrix.

Values parameters

Matrix:

Column1Column2Column3Column4
 2 4
 3

 

Dimension: 2

n: 2

Result

Matrix:
 
Column1Column2
6 8
7 9

 

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

Related Topics

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

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

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