Education Technology

# Knowledge Base

## Solution 11814: Sorting Columns in a Data, List, or Matrix Variable Using the TI-89 Family, TI-92 Plus, or Voyage™ 200.

### Can I sort a column in data, list, or matrix using the TI-89 Family, TI-92 Plus, or Voyage 200?

To sort a column using the TI-89 family, TI-92 family or Voyage 200, please follow the examples listed below.

To sort a single column:

X list = {4, 16, 2, 5}

Y list = {car, ape, bed}

• Access the Data/Matrix Editor. If the Apps Desktop is active, press [APPS] and select the "Data/Matrix Editor". If the Apps Desktop is not active, press [APPS] and select "6:Data/Matrix Editor".

• Scroll down to "3:New" and press [ENTER].

• Scroll down to "Variable:", type in a variable name using the alpha characters (e.g. test1) and press [ENTER] [ENTER].

• Input the X list into c1 and the Y list into c2.

• Using the arrow keys, highlight the name of the column to be sorted (c1 or c2), press [2nd] [F6] ([F6] for the TI-92 family and Voyage 200) and select "3:Sort Column."

Numbers will be sorted in ascending order. Character strings will be sorted in alphabetical order.

To sort a database structure:

It is also possible to sort all columns as a whole, based on a "key" column. A database structure is a set of columns in which each column along the same row contains related information. For example, First Name, Last Name and Age. In this case, sorting only a single column would destroy the relationship between the columns. Follow the procedure below to sort the entire database:

X list = {beth, ann, gary}

Y list = {sims, mead, smith}

Z list = {24, 17, 28}

• Access the Data/Matrix Editor. If the Apps Desktop is active, press [APPS] and select the "Data/Matrix Editor". If the Apps Desktop is not active, press [APPS] and select "6:Data/Matrix Editor".

• Scroll down to "3:New" and press [ENTER].

• Scroll down to "Variable:", type in a variable name using the alpha characters (e.g. test2) and press [ENTER] [ENTER].

• Input the X list into c1, the Y list into c2 and the Z list into c3.

• Using the arrow keys, highlight the name of the column to be sorted (c1, c2, or c3), press [2nd] [F6] ([F6] for the TI-92 family and Voyage 200) and select "4:Sort Col, adjust all."

The selected column or "key" column will be sorted, however, all other columns will be sorted as well to maintain the relationship between the columns.

Note: All columns must be the same length. Also, none of the columns can be locked.

Please see the TI-89 family, TI-92 family and Voyage 200 guidebooks for additional information.