Skip to content
Property Value
Hex Value $14
Categories
Localizations
  • FR: chaîne(

augment(

Overview

Returns a matrix, which is matrixB appended to matrixA as new columns.

Availability: Token available everywhere.

Syntax

augment( matrixA ,matrixB )

Arguments

NameTypeOptional
matrixAmatrix
matrixBmatrix

Location

2nd, matrix, MATH, 7:augment(


Overview

Returns a list, which is listB concatenated to the end of listA.

Availability: Token available everywhere.

Syntax

augment(listA,listB)

Arguments

NameTypeOptional
listAlist
listBlist

Location

2nd, list, OPS, 9:augment(


Description

The augment( command is used to combine two lists or two matrices into one. For lists, this is done the obvious way: adding the elements of the second on to the elements of the first. For example:

augment({1,2,3,4},{5,6,7
    {1 2 3 4 5 6 7}

For matrices, the columns of the second matrix are added after the columns of the first matrix: an R by C matrix augmented with an R by D matrix will result in an R by (C+D) matrix. For example:

augment([[1][2]],[[3][4]
    [[1 3]
     [2 4]]

Advanced Uses

Use the T (transpose) command if you want to combine two matrices vertically, rather than horizontally. For example:

augment([[1,2]]T,[[3,4]]T)T
    [[1 2]
     [3 4]]

Optimization

You may be tempted to use augment( to add one element to the end of a list:

:augment(L1,{X→L1

However, the following way is faster and more memory-efficient while the program is running (although it increases the program's size):

:X→L1(1+dim(L1

Error Conditions

  • ERR:DATA TYPE is thrown if you try to augment a single number to a list, a common error — use {X instead of X.
  • ERR:DIM MISMATCH is thrown if you try to augment two matrices with a different number of rows.
  • ERR:INVALID DIM is thrown if one of the arguments is a list with dimension 0, or if the result would have dimension over 999 (for lists) or 99x99 (for matrices).
  • dim( – for retrieving the size of a list
  • seq( – for creating a list based on a formula, or to create a subset of an existing list
  • T – to transpose a 2D matrix

Source: parts of this page were written by the following TI|BD contributors: burr, DarkerLine, GoVegan, Myles_Zadok, Trenly.

History

Calculator OS Version Description
TI-82 1.0 Added
Authors: Adrien Bertrand