LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

matrix multiplication

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(3,627 Views)

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.

0 Kudos
Message 2 of 3
(3,618 Views)
Solution
Accepted by topic author moni13

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

Message 3 of 3
(3,598 Views)