hp-support-head-portlet

Actions
Loading...

Welcome to HP Customer Support

hp-contact-secondary-navigation-portlet

Actions
Loading...

hp-share-print-widget-portlet

Actions
Loading...
  • Information
    HP fraudulent caller alert - protect yourself from scams

    Learn what to do if you are contacted by fraudulent callers posing as HP representatives. This could be a scam; do not provide any personal information.

    View article

hp-concentra-wrapper-portlet

Actions
Loading...

HP 39g, 39G+, 40g and 40gs Calculators - Matrices

Description
Matrix calculations can be performed in HOME and in programs. The matrix and each row of a matrix appear in brackets and the elements and rows are separated by commas. Matrices can be entered directly in the command line or they can be created in the MATRIX EDITOR.
  note:
If the decimal mark in MODES is set to comma, then the row separators are periods.
Calculator symbol key
The procedures in this document use the following text to represent symbol keys:
Key
Description
Text Representation
colored key; shift key
SHIFT
Move cursor left
cursor-left
Move cursor right
cursor-right
Move cursor up
cursor-up
Move cursor down
cursor-down
Vectors
Vectors are one-dimensional arrays. They are composed of just one row. A vector is represented with single brackets, for example, [1, 2, 3]. A vector can be a real number vector or a complex number vector, for example, [(1, 2) (7,3)].
Matrices
Matrices are two-dimensional arrays. They are composed of more than one row and more than one column. Two-dimensional matrices are represented with nested brackets. For example, [[1, 2, 3], [4, 5, 6]]. Complex matrices can also be created. For example [[(1,2), (3,4)], [(4,5), (6,7)]].
Matrix variables
There are ten matrix variables available, named M0 to M9. These variables can be used in calculations in HOME or in a program. Matrix names can be retrieved from the VARS menu or their names can be typed in through the keyboard.
Creating and storing matrices
Matrices can be created, edited, deleted, sent, and received from the MATRIX CATALOG. To open the MATRIX CATALOG, press SHIFT, then MATRIX. Matrices, named and unnamed, can be created and stored in HOME. For example, the command: POLYROOT([1,0,-1,0])cursor-left, M1 stores the root of the complex vector of length 3 into the M1 variable. M1 now contains the three roots of x3-x=0.
Matrix catalog keys
The table below lists the operations of the menu keys in the MATRIX CATALOG, as well as the use of Delete (DEL) and Clear (SHIFT, then CLEAR).
Key
Description
EDIT
Opens the highlighted matrix for editing
NEW
Prompts for a matrix type, then opens an empty matrix with the highlighted name
SEND
Transmits the highlighted matrix from the calculator to another compatible calculator or a PC.
RECV
Receives a matrix from another compatible calculator or a PC.
DEL
Clears highlighted matrix
SHIFT, then CLEAR
Clears all matrices
SHIFT+cursor-up or down
Moves to the end or the beginning of the catalog
Creating a matrix in the matrix catalog
To create a matrix in the MATRIXCATALOG:
  1. Press SHIFT, then MATRIX to open the MATRIX CATALOG.
  2. Highlight the matrix variable name that is to be used and press NEW
  3. Select the type of matrix to create.
    • For a vector (one-dimensional array), select REAL VECTOR or COMPLEX VECTOR. Certain operations (+, -, CROSS) do not recognize a one-dimensional matrix as a vector, so this selection is important.
    • For a matrix (two-dimensional array), select REAL MATRIX or COMPLEX MATRIX.
  4. For each element in the matrix, type a number or expression, and press ENTER (the expression may not contain symbolic names).
      note:
    For complex numbers, enter each number in the complex form; that is, (a, b), where "a" is the real part and "b" is the imaginary part. Parenthesis and the comma must be included.
  5. Use the cursor keys to move to a different row or column. The direction of the highlight bar can be changed by pressing GO. The GO menu key toggles between the following three options:
    • GO+cursor-down specifies that the cursor moves to the cell below the current cell when ENTER is pressed
    • GO+cursor-right specifies that the cursor moves to the cell to the right of the current cell when ENTER is pressed
    • GO specifies that the cursor stays in the current cell when ENTER is pressed
  6. When done, press SHIFT, then MATRIX to see the MATRIXCATALOG, or press HOME to return to HOME. The matrix entries are already stored.
Transmitting a matrix
To transmit a matrix to a compatible calculator:
  1. Align the calculators' infrared ports or connect the calculator with the cable.
  2. Open the MATRIXCATALOGS on both calculators.
  3. Highlight the matrix to send.
  4. On the sending calculator press SEND
  5. On the receiving calculator press RECV
Editing a matrix
To edit a matrix:
  1. In the MATRIX CATALOG (SHIFT, then MATRIX), highlight the name of the matrix that is to be edited.
  2. Press EDIT
Matrix editing keys
The following table lists the MATRIX EDITING keys for the calculator.
Key
Description
EDIT
Copies the highlighted element to the edit line
INS
Inserts a row of zeros above, or a column of zeros to the left, of the highlighted cell (the calculator gives the option to choose row or column)
GO
Three way toggle for cursor advancement in the MATRIX EDITOR. GO+cursor-right advances to the right, GO+cursor-down advances downward, and GO does not advance at all
BIG
Switches between larger and smaller font sizes
DEL
Deletes the highlighted cells, row, or column (the calculator offers a choice)
SHIFT, then CLEAR
Clears all elements from the matrix
SHIFT+cursor-up, down, left, or right
Moves to the first row, last row, first column, or last column respectively
Displaying a matrix
To display a matrix:
  1. In the MATRIX CATALOG (SHIFT, then MATRIX), highlight the matrix name and press ENTER
  2. In HOME, enter the name of the matrix variable and press ENTER
Displaying one element
In HOME, enter matrixname (row, column). For example, if M2 is [[3, 4], [5, 6]], then M2(1, 2) Enter returns 4.
Creating a matrix in HOME
To create a matrix in HOME:
  1. Enter the matrix in the edit line. Start and end the matrix and each row with square brackets (the shifted 5 and 6 keys).
  2. Separate each element and each row with a comma. For example, [[1, 2], [3, 4]].
  3. Press ENTER to display the matrix.

hp-feedback-input-portlet

Actions
Loading...

hp-online-communities-portlet

Actions
Loading...

Ask the community!


Support Forum

Support Forum

Join the conversation! Find Solutions, ask questions, and share advice with other HP product owners. Visit now


hp-feedback-banner-portlet

Actions
Loading...

hp-country-locator-portlet

Actions
Loading...
Country: Flag United States

hp-detect-load-my-device-portlet

Actions
Loading...