Difference between revisions of "TI-BASIC:Matr List"
(Automated @@ correction) |
(Automated superscript correction) |
||
Line 40: | Line 40: | ||
= Advanced Uses = | = Advanced Uses = | ||
− | While the command deals with columns, occasionally you might want to store the matrix to lists by rows. The | + | While the command deals with columns, occasionally you might want to store the matrix to lists by rows. The <sup>[[TI-BASIC:Transpose|T]]</sup> (transpose) command is your friend here: applying it to the matrix will flip it diagonally, so that all rows will become columns and vice-versa. For example: |
<div class="code"> | <div class="code"> | ||
Line 47: | Line 47: | ||
@< >@[21 22 23 24] | @< >@[21 22 23 24] | ||
@< >@[31 32 33 34]] | @< >@[31 32 33 34]] | ||
− | Matr►list(Ans | + | Matr►list(Ans<sup>T</sup>,L,,1,,,L,,2,, |
@< >@Done | @< >@Done | ||
L,,1,, | L,,1,, | ||
Line 76: | Line 76: | ||
* [[TI-BASIC:List►matr(|List►matr(]] | * [[TI-BASIC:List►matr(|List►matr(]] | ||
− | * | + | * <sup>T</sup> ([[TI-BASIC:Transpose|Transpose]])[[Category:TI-BASIC]] |
[[Category:TIBD]] | [[Category:TIBD]] |
Revision as of 22:24, 24 February 2016
Command Summary
Stores one or more columns of a given matrix to list variables
Command Syntax
Matr►list(matrix, list-var1, [list-var2, ...]) Matr►list(matrix, column#, list-var)
Menu Location
Press:
- MATRX (on the 83) or 2nd MATRX (83+ or higher) to access the matrix menu
- LEFT to access the MATH submenu
- 8 to select Matr►list(, or use arrows.
TI-83/84/+/SE
2 bytes
The Matr►list( command stores one or more columns of a matrix (or expression resulting in a matrix) to list variables. The syntax is simple: first enter the matrix, then enter the list or lists you want to store columns to. The first (leftmost) column will be stored to the first list entered, the second column will be stored to the second list, and so on. For example:
[[11,12,13,14][21,22,23,24][31,32,33,34 [[11 12 13 14] [21 22 23 24] [31 32 33 34]] Matr►list(Ans,L1,L2 Done L1 {11 21 31} L2 {12 22 32}
If there are more lists than columns in the matrix when doing Matr►list(, the extra lists will be ignored.
Matr►list( can also be used to extract a specific column of a matrix to a list. The order of the arguments is: matrix, column number, list name.
[[11,12,13,14][21,22,23,24][31,32,33,34 [[11 12 13 14] [21 22 23 24] [31 32 33 34]] Matr►list(Ans,4,L1 Done L1 {14 24 34}
Advanced Uses
While the command deals with columns, occasionally you might want to store the matrix to lists by rows. The T (transpose) command is your friend here: applying it to the matrix will flip it diagonally, so that all rows will become columns and vice-versa. For example:
[[11,12,13,14][21,22,23,24][31,32,33,34 @< >@[[11 12 13 14] @< >@[21 22 23 24] @< >@[31 32 33 34]] Matr►list(AnsT,L,,1,,,L,,2,, @< >@Done L,,1,, @< >@{11 12 13 14} L,,2,, @< >@{21 22 23 24}
Optimizations
When using Matr►list( to store to named lists, only the first list must have an ∟ in front of its name -- it can be omitted for the rest. For example:
:Matr►list([A],∟COL1,∟COL2,∟COL3 can be :Matr►list([A],∟COL1,COL2,COL3
On the other hand, when storing a specific column of a matrix to a named list, the list does not need to be preceded by an ∟.
:Matr►list([A],N,∟COL1 can be :Matr►list([A],N,COL1
Related Commands
- List►matr(
- T (Transpose)