10-04-2015 08:32 AM - edited 10-04-2015 08:34 AM
HI i would to ask how i perform 10x10 matrix muptiplication with array( not using linear algebra)..
AxB=C(A,B,C all 10x10) . How do i do this? Thanks a lot for any help
Solved! Go to Solution.
10-04-2015 09:17 AM
Are you talking about actual matrices in LabVIEW? Or just 2D arrays in LabVIEW?
You can straight up multiply two 2D arrays together. If you are talkinga about the actual matrix datatype, then you can convert the matrices to 2D arrays, then multiply.
10-04-2015 10:20 AM
If you remember your high-school algebra, then it should be a very easy process to treat two 2-D arrays of (I was going to say "floats", but they could be integers) numbers as though they were a matrix and simply carry out the operation. Having For loops to auto-index through the two arrays, and appropriate Array functions (big hint -- such as Transpose) make it easy to do this in a very compact way. Of course, if you never learned about matrices and how to manipulate them, it will be trickier ...
Just thinking about it, you should be able to do it with two nested For loops, one Array function, and two Numeric functions. For Extra Credit, you can add a Boolean test (followed by a Case Statement that gives an appropriate Error Message if the test fails) to ensure that the two Arrays have a compatible size.
Bob Schor