LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to multiply first line of Array A with last column of Array B?

Solved!
Go to solution

How to multiply first line of  Array A with  last column of  Array B element by element?Both Arrays are 2D square arrays. 

0 Kudos
Message 1 of 8
(3,083 Views)

Hi Marius, what do you mean by multiply? Would the number of elements of the arrays being multiplied be the same? Do you want dot product or element by element? Why are you only multiplying those two, are you sure you don't want to explore some of the matrix math operations? Have you used the index array function before?

0 Kudos
Message 2 of 8
(3,081 Views)

I just started college, and i had a labview course last week which i missed. And the teacher gave us  some problems to solve. And this one i can't.Well The thing is that there are 2  Matrices, A and B(they are square matrices- 5 x 5 in my case). And I need to multiply first line of A matrix with the last column of B matrix, element by element.

0 Kudos
Message 3 of 8
(3,076 Views)
Solution
Accepted by topic author Marius56

Just use "index array" and "multiply". Use the first index of index array to pull off a row, or the second to pull of a column. If you can't find those functions, type in ctrl + space and the quick drop will pop up, you can just type in the functions you want.

 

I must warn you though, LabVIEW is not much fun when you just go in blind without learning how it works. You should try to go through some of the free training available listed on the front page of the forums, or the "Unofficial rules and guidelines".

Message 4 of 8
(3,074 Views)

Could you take a look at this, please? 

0 Kudos
Message 5 of 8
(3,056 Views)
Solution
Accepted by topic author Marius56

Close, but LabVIEW uses index 0, so you are multiply the 2nd row (empty) by the 6th column (empty) and getting (empty). 

Message 6 of 8
(3,051 Views)

Thanks, it's working now. I appreciate the help 🙂 

0 Kudos
Message 7 of 8
(3,045 Views)

To get the first row, you don't need to wire any indices. (as as has been mentioned, the index would be zero)

 

To get the last column, the index depends on the number of columns, so you should do it based on the array size and not use a constant. You can get the number of columns directly using matrix size. The desired index would be "number of columns -1"

0 Kudos
Message 8 of 8
(3,038 Views)