> I have a real valued single vector (measurement data) and a complex > double matrix to multiply. Size: vector about 10 elements, matrix > about square 10x10. > > Which is the most efficient way to compute in LV? There seems to be no > explicit real times complex and I do not know, how coercion is done in > detail (e.g. explicitly with memory movements or implicitly during > loading in Pentium FP registers). >
The VI for matrix vector multiplication could be used to muliply the vector times the real and imaginary parts of the complex matrix, then recombined. Or you could use a loop to iterate through the rows or columns of the matrix, then multiply by the vector and sum the result to create the item for the output vector. The vector will be accumulated using autoindexing on the loop. If you only want the real portion of the output, do the cast inside the loop. At least that is what I think you want to do. You will have to pardon my rusty linear algebra. As for which will be more memory efficient, it is hard to say since I still don't know for sure what you want as an output. With only ten elements in the vector, we aren't talking about much memory in either case. Both solutions should take ten minutes to whip up and compare in terms of performance and/or memory usage. Typically the faster will also use less memory in this sort of VI. Avoid using local variables or other items and you should be fine. By the way to time this, you will likely need to do the multiplication 10 or 100 thousand times to get a decent elapsed time for the PC clock resolution. Greg McKaskle
