Difference between revisions of "TI-BASIC:Matr List"

From Learn @ Cemetech
Jump to navigationJump to search
(Initial automated import)
 
(Automated @@ correction)
Line 2: Line 2:
 
|picture=MATRTOLIST.GIF
 
|picture=MATRTOLIST.GIF
 
|summary=Stores one or more columns of a given matrix to list variables
 
|summary=Stores one or more columns of a given matrix to list variables
|syntax=Matr►list(''matrix'', ''list-var1'', @@[@@''list-var2'', ...])
+
|syntax=Matr►list(''matrix'', ''list-var1'', <nowiki>[</nowiki>''list-var2'', ...])
 
Matr►list(''matrix'', ''column#'', ''list-var'')
 
Matr►list(''matrix'', ''column#'', ''list-var'')
 
|location=Press:
 
|location=Press:

Revision as of 21:39, 24 February 2016

MATRTOLIST.GIF

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:

  1. MATRX (on the 83) or 2nd MATRX (83+ or higher) to access the matrix menu
  2. LEFT to access the MATH submenu
  3. 8 to select Matr►list(, or use arrows.

Calculator Compatibility

TI-83/84/+/SE

Token Size

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(Ans^^T^^,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