LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inverse Matrix

Hi can anyone advise me on how to create an inverse matrix on a 2D array?
This is how i created my 2D array(2x2 matrix):
Use the build array function to append
the first 2 arrays into a longer 1D array, then do the same with the other
2, then use the build array function again in its default manner to stack
the 2 longer 1D matices on top of each other.
 
My problem is how to extract out every square martix set  in each iteration to do an inverse?
 
 
0 Kudos
Message 1 of 11
(4,607 Views)
Try looking in Analyze->Mathematics->Linear Algebra->Inverse Matrix.  It should work for you if you know that there will be an inverse.  Is that something that you'll know ahead of time?
0 Kudos
Message 2 of 11
(4,596 Views)

As Novatron said, there is an inverse matrix tool, Just search teh palette.

Still, your description is not clear to me. How long is "the longer 1D array"? A 2x2 array does not have any sqaure matrix subsets. To get a sqaure subset of a larger array, use array subset.

Could you provide more details or even attach a simplified example VI?

0 Kudos
Message 3 of 11
(4,594 Views)
i knew the inverse matrix.vi but i could not generate the inverse matrix for each iteration as is not a square matrix.
 
Say In programming language i am trying to achieve this
 
for i=1:n

A=[X(i) Y(i);Z(i) W(i)];

ans(i)=inv(A)* B;

end
0 Kudos
Message 4 of 11
(4,591 Views)
I was under the impression that in order for a matrix to have an inverse period, it had to be square.
0 Kudos
Message 5 of 11
(4,585 Views)
OK, this seems trivial then 😉
You form the 2x2 matrix from the i'th elements of the four input vectors X,Y,Z,W and multiply the inverse with vector B. Each answer is a 1d array, thus giving you a 2D array that contains all results from i=1..n. You don't need any shift registers!
 
See attached (LabVIEW 7.0).

Message Edited by altenbach on 08-09-2005 09:21 AM

0 Kudos
Message 6 of 11
(4,584 Views)
i cant run the modifed vi. there seem to be a missing vi called "Real Inverse Matrix.vi"
0 Kudos
Message 7 of 11
(4,573 Views)

My VI was created in LabVIEW 7.1 and converted to 7.0 Some enhancements were made to the matrix operations in 7.1 but it should downconvert fine. Just ingnore the missing VI and it should substitute the 7.0 inverse matrix automatically once it has finished loading. Try it!

If not, just replace my "inverse matrix" with yours from LabVIEW 7.0.

0 Kudos
Message 8 of 11
(4,569 Views)

Check this out, this is what i got from the vi. 

Do i need to create a build array to the error?

0 Kudos
Message 9 of 11
(4,566 Views)
No replace it by AxVector (or whatever you had in your original VI).
 
(In LabVIEW 7.1, this VI is polymorphic and accepts AxB or AxVector, depending on input. I think in 7.0 these were seperate VIs.)
0 Kudos
Message 10 of 11
(4,557 Views)