MINITAB for Matrices

STA417 Spring 2000

You may recall columns in minitab (vectors of data) have names like c1, c2, and so forth. Matrices in minitab are called m1, m2, and so on. For help with matrix commands, type

MTB> help commands 16

and

MTB>help (command name)

for help with a particular command. Some of the highlights currently relevant to you are read, print, and mult. In addition, I wrote a macro to raise matrices to a power that is described in this document.

The read command reads a matrix into minitab. For example

MTB > read 2 3 m1
DATA> 1 2 3
DATA> 3 4 5
      2 rows read.

The 2 and the 3 in the read command itself specify the number of rows and columns in the matrix, the m1 gives the name. For example the command

MTB> read 4 4 m3

would say read in a 4x4 matrix and place it in m3. After typing the read command, enter the rows of the matrix at the DATA prompts.

The command print writes the matrix to the screen, for example the command

MTB> print m1

produces the output

     Matrix M1
     1   2   3 
     3   4   5

To multiply matrices, use the mult command. The command

MTB> mult m1 m2 m3

multiplies matrices m1 and m2 together and places the result in m3 (the dimensions of the matrix must allow multiplication, of course)

As for raising matrices to a power, I did not find a way for MINITAB to compute singular value decompositions, so that trick won't work. Another difficulty I had is that I couldn't figure out how to equate matrices, such as m2=m1. To make m2 equal to m1, I used mult m1 1 m2, which is inelegant but seems to work. That's not particularly relevant to you, but if you notice a way of doing either of these actions let me know.

I DID write a macro to raise matrices to a power. It is in my home directory on SAC under the filename matpow.MAC. To use the macro, copy this file from my account ( kviel0) to your account and then start minitab. When you are ready to raise a matrix to a power, say raising m1 to the 4 power, the command

MTB> %matpow m1 4 m2

will place m1 raised to the fourth power in the matrix m2. Of course, feel free to replace 4 with 1000 or whatever other power you want.

If there are problems, please let me know.

About this document ...

MINITAB for Matrices

This document was generated using the LaTeX2HTML translator Version 96.1 (Feb 5, 1996) Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

The command line arguments were:
latex2html -split 0 -show_section_numbers minimat.tex.

The translation was initiated by Kert Viele on Sat Jan 15 15:04:24 EST 2000


Kert Viele
Sat Jan 15 15:04:24 EST 2000