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θ__icosα__isinθ__isinα__icosθ__ia__isinθ__icosθ__icosα__i−cosθ__isinα__isinθ__ia__i0sinα__icosα__id__i0001
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.
Applications
Code Generation for a Robot Arm
Download Help Document