Read data into a matrix

Calc > Matrices > Read

Complete the following steps to create a matrix using data that you type or data from a text file.

Note

To enter matrix values from the keyboard, command language must be enabled. For more information, go to Session window and click "Enable the command prompt (MTB>) to view and generate command language".

  1. In Number of rows, enter the number that defines the width of the matrix.
  2. In Number of columns, enter the number that defines the length of the matrix.
  3. In Read into matrix, enter a number (for example, M1) or a name for the matrix. If the name contains spaces, enclose the name in single quotation marks.
  4. Specify how to enter the values for the matrix:
    • Read from keyboard: Type the matrix values in the Session window.
    • Read from file: import data from a .txt or .dat file.
  5. Click OK.
  6. If you specified Read from keyboard, type the values for the matrix, one row at a time, separating the values with commas or spaces. Press Enter after each row.
  7. If you specified Read from file, browse to and select the .txt or .dat file that contains the values for the matrix.
Tip

To view the matrix, choose Data > Display Data.

By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy