Hi,
i need to Solve a Matrix Multiplication in VBA without MMULT
123
A = 456
789
B =10 20 30
40 50 60
70 80 90
but i cant figure out how to do it.
Please help :/
Hi,
i need to Solve a Matrix Multiplication in VBA without MMULT
123
A = 456
789
B =10 20 30
40 50 60
70 80 90
but i cant figure out how to do it.
Please help :/
With a requirement like "don't use the built in MMULT() function", this feels like an educational exercise, so I hesitate to just give code. What part of writing this are you having trouble with?
1) If you are having trouble understanding the mathematical defintion of matrix multiplication, you might refer here or similar to refresh your understanding of matrix multiplication: https://www.mathsisfun.com/algebra/m...ltiplying.html In this case, among other things to note, the tutorial explains that matrix multiplication is not commutative (A*B will not always be the same as B*A). In your case, A*B is undefined, so that these two matrices can only be multiplied as B*A (just in case part of the problem is that you were trying to do A*B).
2) I would expect that a proper matrix mutliplication procedure would involve a pair of nested For...Next loops at its core. Are you familiar with For...Next loops? What part of setting up a pair of nested For...Next loops are you having trouble with? A For...Next loop tutorial: https://www.wiseowl.co.uk/blog/s193/vba-for-next.htm
How can we help you with this exercise?
Originally Posted by shg
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks