You can load this session from /home/ceng303/maple/sessions as: ch3_3.mw


Session 3.3 The Linear Algebra Package

> restart;

> with(linalg):

Note the colon; this prevents Maple from listing all the functions in the package.

Using a semi-colon will list the functions in the package.

Warning, the protected names norm and trace have been redefined and unprotected

> Ns:=array([[n11,n12],[n21,n22],[n31,n32]]);

 

Create a 3x2 matrix

Ns := matrix([[n11, n12], [n21, n22], [n31, n32]])

> for k from 1 to 2 do

>   Ns[1,k]:=Ns[2,k]+Ns[3,k];

> end do;

Ns[1, 1] := n21+n31

Ns[1, 2] := n22+n32

> print(Ns);

matrix([[n21+n31, n22+n32], [n21, n22], [n31, n32]])

>