$SPAD/src/input sqmatrix.input

Timothy Daly December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1991.

———-

— * —

)set break resume
)spool sqmatrix.output
)set message test on
)set message auto off
)clear all
--S 1 of 6
)set expose add constructor SquareMatrix
--R
--R   SquareMatrix is now explicitly exposed in frame initial
--E 1
--S 2 of 6
m := squareMatrix [[1,-%i],[%i,4]]
--R
--R
--R        +1   - %i+
--R   (1)  |        |
--R        +%i   4  +
--R                                       Type: SquareMatrix(2,Complex(Integer))
--E 2
--S 3 of 6
m*m - m
--R
--R
--R        + 1   - 4%i+
--R   (2)  |          |
--R        +4%i   13  +
--R                                       Type: SquareMatrix(2,Complex(Integer))
--E 3
--S 4 of 6
mm := squareMatrix [[m, 1], [1-m, m**2]]
--R
--R
--R        ++1   - %i+      +1  0+   +
--R        ||        |      |    |   |
--R        |+%i   4  +      +0  1+   |
--R   (3)  |                         |
--R        |+ 0    %i +  + 2   - 5%i+|

--R        ||         |  |          ||
--R        ++- %i  - 3+  +5%i   17  ++
--R                       Type: SquareMatrix(2,SquareMatrix(2,Complex(Integer)))
--E 4
--S 5 of 6
p := (x + m)**2
--R
--R
--R         2   + 2   - 2%i+    + 2   - 5%i+
--R   (4)  x  + |          |x + |          |
--R             +2%i    8  +    +5%i   17  +
--R                           Type: Polynomial(SquareMatrix(2,Complex(Integer)))
--E 5
--S 6 of 6
p::SquareMatrix(2, ?)
--R
--R
--R        + 2                        +
--R        |x  + 2x + 2  - 2%i x - 5%i|
--R   (5)  |                          |
--R        |              2           |
--R        +2%i x + 5%i  x  + 8x + 17 +
--R                           Type: SquareMatrix(2,Polynomial(Complex(Integer)))
--E 6
)spool
)lisp (bye)

———-

References^{[1] nothing}

5