Difference between revisions of "TI-BASIC:Augment"

From Learn @ Cemetech
Jump to navigationJump to search
(Initial automated import)
 
(Automated superscript correction)
 
Line 31: Line 31:
 
= Advanced Uses =
 
= Advanced Uses =
  
Use the ^^[[TI-BASIC:Transpose|T]]^^ (transpose) command if you want to combine two matrices vertically, rather than horizontally. For example:
+
Use the <sup>[[TI-BASIC:Transpose|T]]</sup> (transpose) command if you want to combine two matrices vertically, rather than horizontally. For example:
  
  
Line 63: Line 63:
 
* [[TI-BASIC:Dim|Dim(]]
 
* [[TI-BASIC:Dim|Dim(]]
 
* [[TI-BASIC:Seq_List|seq(]]
 
* [[TI-BASIC:Seq_List|seq(]]
* ^^T^^ ([[TI-BASIC:Transpose|Transpose]])[[Category:TI-BASIC]]
+
* <sup>T</sup> ([[TI-BASIC:Transpose|Transpose]])[[Category:TI-BASIC]]
 
[[Category:TIBD]]
 
[[Category:TIBD]]

Latest revision as of 22:24, 24 February 2016

AUGMENT.GIF

Command Summary

Combines two lists or matrices into one. In the case of matrices, this is done horizontally rather than vertically.

Command Syntax

augment(list1,list2

augment(matrix1,matrix2

Menu Location

Press:

  1. 2nd LIST to access the List menu
  2. RIGHT to access the OPS submenu
  3. 9 to select augment(, or use arrows

Alternatively, press:

  1. MATRX (on the TI-83) or 2nd MATRX (TI-83+ or higher) to access the Matrix menu
  2. RIGHT to access the MATH submenu
  3. 7 to select augment(, or use arrows

Calculator Compatibility

TI-83/84/+/SE

Token Size

1 byte

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,2T,3,4T)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).

Related Commands