05-23-2015 11:00 AM
@uni-pixel wrote:
what should i do at this point.
At this point you should stop spoonfeeding us tiny problem fragments and define exactly what you have, what you do with it, and what you want out of it.
If you get an error, at least tell us the error code.
Do the dimension sizes agree with what the multiplication expects? (the sizes cannot be random!)
A hermitian is a square matrix. Is yours?
Please attach a small VI containing your inputs as diagram constants and showing the operation you are trying to do. Tell us the expected result.
05-23-2015 11:43 AM
Do you know how to multiply matrices? A[i,j]*B[j,k]=C[i,k] where C[i,k] = sum-over-j([A[i,j]*B[j,k]). As I noted in an earlier post, a 2D Array is not a Matrix. Some versions of LabVIEW have (in the Array Palette) some Matrix functions -- I've never used them, so I won't advise you how to use them. But you can easily write a "Matrix Multiply" VI that takes two 2D arrays and returns a single 2D arrays that is the result of the formula above.
This returns the 2-D array [[30,10],[10,4]], which (doing the multiplication by hand) should be the correct answer. The implementation of the Matrix Product sub-VI "is left as an exercise for the Reader". [It's pretty simple -- just follow the definition, above, and remember how LabVIEW does array multiplication].
Bob Schor
05-23-2015 11:50 AM
Altenbach makes a very good point -- the definition of a Hermitian Matrix is "a square matrix that is equal to its own complex conjugate". What you proposed to do with 1D arrays is certainly perfectly do-able, but unless the 1D array is a real matrix of length 1, you can hardly call it "Hermitian". [Hermite would be rolling in his grave ...]. So at the very least, the Subject of this Forum Entry is misleading ...
BS
05-23-2015 12:23 PM - edited 05-23-2015 12:41 PM
@Bob_Schor wrote:
Some versions of LabVIEW have (in the Array Palette) some Matrix functions -- I've never used them, so I won't advise you how to use them.
All LabVIEW versions (even "Base") have the matrix operations in the linear algebra palette (Result A). You can also convert your 2D array to a matrix datatype and the regular multiply operation will do a proper matrix multiplications (result B).
Of course the order of the inputs matter, so if you swap the inputs, the result will typically be different (result C).
Note that if you would do a plain multiply on a 2D array, you would get an element-by-element multiplication, which would be a very different result. If you use the linear algebra tools on 2D arrays, you get the correct matrix operation, of course.