I was suggesting taking advantage of the Excel function MDETERM rather
than writing your own. You can simply call the Excel function within
VBA by using "application.MDETERM". There is no doubt a clever way to
write your own procedure to do the determinent of a general nxn
matrix, but I have not
Hi Mr. or Ms. Anonymous,
I need the code in VBA to calculate the determinant value of a matrix.
Below, a code for calculation determinant value of 2X2 matrix.
Any suggestion?
Respectfully yours,
ASD
* * *
Private Function MyFunction_MDETERM(Range As Variant)
'function returns the matrix determ
If I understand the question right, this is easy...
Define a matrix as an array of doubles
for example
Dim M(2,2) as double
This will be a 3X3 matrix. You can fill in the values any way you
want. The determinant of this matrix is found by calling
x = application.MDETERM(m)
On Sep 29, 6:2