MaplePortal/MatrixMath - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MaplePortal/MatrixMath

 

Matrix Computation

Back to Portal

Introduction

 

Maple has many tools for linear algebra. Its capabilities include

 

• 

symbolic and numeric computations, and hybrid matrices

• 

eigenvalues and eigenvectors, both classical and generalized.

• 

linear algebra over finite fields.

• 

matrix factorizations and system solvers

• 

numerical methods for dense and sparse systems with a high degree of user control

• 

hardware float and arbitrary precision software float data

• 

numeric routines from CLAPACK and optimized vendor BLAS (ATLAS and MKL) libraries, called automatically when appropriate.

• 

automatically parallelized numeric computation, when appropriate

 

Symbolic Matrix Computation

 

Here, we derive the Denavit-Hartenberg matrix for a robotic serial manipulator. These matrices were entered using the Matrix palette (other methods are described here) and a period is used for matrix multiplication.

 

> 

B1≔10000100001d__i0001.cos⁡θ__i−sin⁡θ__i00sin⁡θ__icos⁡θ__i0000100001:

> 

B2≔10000cos⁡α__i−sin⁡α__i00sin⁡α__icos⁡α__i00001.100a__i010000100001:

> 

H≔B1.B2

H≔cos⁡θ__i−sin⁡θ__i⁢cos⁡α__isin⁡θ__i⁢sin⁡α__icos⁡θ__i⁢a__isin⁡θ__icos⁡θ__i⁢cos⁡α__i−cos⁡θ__i⁢sin⁡α__isin⁡θ__i⁢a__i0sin⁡α__icos⁡α__id__i0001

(1)

Maple will handle arbitrarily large symbolic matrices.

 

Numeric Matrix Computation

 

Here we solve the linear system M.x = v for a sparse system. Numerical data is randomly generated

 

> 

withLinearAlgebra:

> 

M≔RandomMatrix1000,1000,density=0.001,datatype=float8;

> 

v≔RandomVector1000,density=0.001,datatype=float8

> 

for i from 1 to 1000 do Mi,i≔i:end do:

> 

x≔LinearSolveM,v

To test the accuracy of the numeric solution, the following quantity must be zero or a very small number

> 

NormM.x−v

0.

(2)

 

Applications

Code Generation for a Robot Arm