inv - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Matlab

 inv
 compute the inverse of a MapleMatrix or MatlabMatrix in MATLAB(R)

 Calling Sequence inv(X)

Parameters

 X - MapleMatrix or MatlabMatrix

Description

 • The inv command computes the inverse of a square matrix using MATLAB®.
 • Executing the inv command returns a Matrix or a constant.

Examples

Define the Maple matrix

 > $\mathrm{with}\left(\mathrm{Matlab}\right):$
 > $\mathrm{maplematrix_a}≔\mathrm{Matrix}\left(\left[\left[6,4,2\right],\left[7,8,1\right],\left[3,7,3\right]\right]\right)$
 ${\mathrm{maplematrix_a}}{≔}\left[\begin{array}{ccc}{6}& {4}& {2}\\ {7}& {8}& {1}\\ {3}& {7}& {3}\end{array}\right]$ (1)

The inverse of this MapleMatrix is computed as

 > ${\mathrm{Matlab}}_{\mathrm{inv}}\left(\mathrm{maplematrix_a}\right)$

 [0.212499999999999966 , 0.0250000000000000360 , -0.150000000000000022] [                                                                    ] [-0.224999999999999977 ,  0.149999999999999966 , 0.100000000000000032] [                                                                    ] [0.312500000000000000 ,  -0.374999999999999944 , 0.249999999999999944]

Alternatively, the matrix is set in MATLAB® and inverted as a MatlabMatrix.

 > ${\mathrm{Matlab}}_{\mathrm{setvar}}\left("matlabmatrix_a",\mathrm{maplematrix_a}\right)$
 > ${\mathrm{Matlab}}_{\mathrm{inv}}\left("matlabmatrix_a"\right)$

 [0.212499999999999966 , 0.0250000000000000360 , -0.150000000000000022] [                                                                    ] [-0.224999999999999977 ,  0.149999999999999966 , 0.100000000000000032] [                                                                    ] [0.312500000000000000 ,  -0.374999999999999944 , 0.249999999999999944]