I am inverting a matrix - but it seems that it only works if my first element is XTX(1,1) - in other words Option Base 1 - can anybody confirm if that is true or not. Below is my code - in order to get it working - I had to make the array XTX start with element 1 - if I use option base zero it generates an error. I know the simple answer is to just use option base 1 - however all my other arrays are zero based. So what a mess if arrays are different starting point.
I am starting to think that I should use option base 1 - period - it seems Excel sometimes support both - but always support option base 1.
Code:
For XX = 0 To NumVal - 1
For XXX = 0 To NumVal - 1
InvXTX(XX, XXX) = Application.Index((Application.MInverse(XTX)), XX + 1, XXX + 1)
Next XXX
Next XX
Bookmarks