Skip to main content

How to write a general internal function to calculate the inverse of a matrix

  • June 23, 2021
  • 1 reply
  • 57 views

Forum|alt.badge.img+1

It seems that for an internal function, I have to specify the arguments with index and size? How can I create an internal function to calculate inverse for any matrix? In this case, do I have to use external function? Thanks.

1 reply

mohansx
Forum|alt.badge.img+5
  • Former AIMMSian
  • 223 replies
  • June 24, 2021

@fwang1986 you have to specify an argument with two indices yes (like inputMatrix(i, j)) but you don’t have to specify the size explicitly. 

 

Create local sets in the function Set_I and Set_J, use these indices for the input argument inputMatrix(i, j). 

 

Please review Library of functions and procedures — AIMMS How-To for more details.