• Futurama Formulas - Date and time
• Futurama Formulas - Math
• Futurama Formulas - Statistical
• Futurama Formulas - Text
• Futurama Formulas - Logical
• Futurama Formulas - Table
• Futurama Formulas - Document
• Futurama Formulas - Conversion
• Futurama Formulas - Matrix
• Creating custom formulas in Futurama

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'.