Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Functions > Arrays, Vectors, and Subscripts

INVERT MATRIX(mat,n) INVERT a MATRIX

Scroll Prev Top Next More

Returns the inverse of the nxn matrix mat.

This returns the inverse of a two dimensional array.  

Restrictions:  INVERT MATRIX must appear first on the right hand side of an equation and not be followed by anything else.  Both mat and the left hand side variables must be Subscripted variables with the last two Subscripts each having n elements.  

Units:INVERT MATRIX(units,dmnl) --> units

Example

sub : s1,s2 

ssub <-> sub

a[s1,sub] = 1,2 

a[s2,sub] = 3,4

ainverse[sub,ssub] = INVERT MATRIX(a[sub,ssub],2)

Would result in an inverse of:

-2,   1

1.5, -.5

Availability:  Vensim Professional and DSS only.

 

Sample model: INVERT MATRIX.mdl in FunctionExamples