compositeFEA
Mechanical
- Jun 26, 2011
- 9
Hello everyone,
I am looking for an easy way to calculate the inverse of a matrix in VBA. The matrix is 3-D: 3 x 3 x n (with n variable). What I need is the inverse of each "3x3" plane, therefore I would like to use a For/Next loop from 1 to n to do it. I know I could use the following code in Matlab:
Is there a similar way to do this in VBA? What is the VBA equivalent for the ":" in Matlab?
Thanks for your help!
I am looking for an easy way to calculate the inverse of a matrix in VBA. The matrix is 3-D: 3 x 3 x n (with n variable). What I need is the inverse of each "3x3" plane, therefore I would like to use a For/Next loop from 1 to n to do it. I know I could use the following code in Matlab:
Code:
for i=1:n
A(:,:,i) = inv(B(:,:,i))
end
Is there a similar way to do this in VBA? What is the VBA equivalent for the ":" in Matlab?
Thanks for your help!