+ Reply to Thread
Results 1 to 4 of 4

Calculate Matrix Inverse without the MINVERSE function in excel

  1. #1
    Registered User
    Join Date
    10-05-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Unhappy Calculate Matrix Inverse without the MINVERSE function in excel

    I have to write a VBA function that will calculate the inverse of an arbitrary 2X2 or 3X3 matrix, involving the adjoint of the matrix. The function should flag any unsuitable matrices that are not 2X2 or 3X3 and should stop. I can't use the MINVERSE function in Excel.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Calculate Matrix Inverse without the MINVERSE function in excel

    Making use of CELLS(Row,Column) in a loop to calculate the determinant. Use a loop to divide the Aij's by D.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    10-05-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Calculate Matrix Inverse without the MINVERSE function in excel

    I'm really new to VBA, so I don't know how to do that. It would great if anyone can help me get started with some codes.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,820

    Re: Calculate Matrix Inverse without the MINVERSE function in excel

    In many ways, I find it interesting that someone "really new to VBA" has been assigned what I would consider a more advanced problem like this. As protonleah says, this is going to involve using the cells method and different loops to perform the numerous calculations that go into inverting a matrix. If you are unfamiliar with those concepts, then I would suggest you first come to understand those concepts before tackling the matrix inversion algorithm. A couple of references: http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx
    http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

    This might be a useful reference. http://www.ccodechamp.com/c-program-...rse-of-matrix/ His example code is in C, but he also describes the algorithm he is using in building the code (including the adjoint or adjugate). Once you understand enough VBA, this should be useful in putting the code together.

    One last thought. As someone who is "really new to VBA," it would help us help you if you could pose specific questions that help us see what you do know and what you don't know so we can best help you learn the concepts that you will need to put this together.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need help with inverse matrix
    By kylwggns in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-05-2012, 11:02 AM
  2. Inverse Matrix Function Problem
    By MichielVrijbergen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2011, 10:21 AM
  3. Inverse Matrix
    By adashiu in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-23-2010, 11:24 AM
  4. Invert matrix with MInverse
    By Tommyrap in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-30-2010, 01:40 PM
  5. Invert a matrix larger than 52 x 52 using MINVERSE
    By W0PSI in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2006, 11:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1