LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linear algebra matrix-vector dimensions

Solved!
Go to solution

I'm using LabVIEW 2012 to do some linear algebra. In linear algebra language, I need to take one 3x3 matrix (call it A), dot-multiply it with a 3x1 vector (call it B) and obtain a 3x1 vector (call it C). In LabVIEW, the dot product cannot operate between matrices and vectors. Therefore I use the AXB function, which works. However, the output of AXB is always seen as a matrix and not a vector. So when I try to convert C back to an array, it is recognized as a 2D array instead of 1D array as it should. How can I do the conversion properly?

 

Even worse, if I take C, transpose it (so it's 1x3), and try to dot-multiply it by anoother 3x1 vector (to obtain a scalar), the dot-product does not accept the input: C is not actually considered a vector but a matrix, and in labview dot-product does not operate with matrices. So how can I do that multiplication to obtain a scalar?

 

Thanks!

0 Kudos
Message 1 of 2
(2,751 Views)
Solution
Accepted by topic author vpicco

I figured it out. The liinear algebra functions also accept 1D arrays as input. That way one can use for example the AXB function, set its type to A X Vector, and obtain a 1D array as output.

0 Kudos
Message 2 of 2
(2,739 Views)