LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiply matrix columns

Solved!
Go to solution
Highlighted

Hi,

 

I have two matrices 1 2d and 1 1d I wish to multiple the first element of the 1d by the each element of the first column of the 2d, the second element of the 1d by all the elements of the second column of the the 2d and so on. However I dont know how to implement this?

 

e.g.

 

             111                       123

             111    x   123   =    123     (The number of columns in the 1d array will always be the same as the number in the 2d array)

             111                       123

 

Any help would be greatly appreciated.

 

Thanks

Nick Muir

 

 

 

 

0 Kudos
Message 1 of 3
(1,350 Views)
Highlighted
Solution
Accepted by topic author Canalian

Use an autoindexing FOR loop.

 

LabVIEW has no distinctions between a row vector and a column vector, it's just a 1D array.

 

Also, I would use a 2D array instead of a matrix.

 

(Make sure to disable autoindexing on the 1D array input tunnel)


LabVIEW Champion. It all comes together in GCentral GCentral
Message 2 of 3
(1,343 Views)
Highlighted

Hi Altenbach,

 

Once again your my saviour.

 

Appreciate it

 

Nick

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