LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array multiply with 2D output

I have two 1D arrays. I want to multiply them and get a 2D array as an output (like a dot multiply in Matlab). For example, one array could be 4 numerical constants and other 20 points of data. I want my output to be 4 x 20: a version of the data scaled by each of the 4 scale factors.

The regular multiply function gives a 1D output. How can I get a 2D output?
0 Kudos
Message 1 of 4
(2,529 Views)
How about a For loop?
Disable indexing on the data, enable it on the factors.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
Message 2 of 4
(2,520 Views)
An elegant solution -- thanks! I also found the "outer product" VI. I bet it implements the simple for loop you have described! I'm up and running again...
0 Kudos
Message 3 of 4
(2,512 Views)
Yes, the outer product is what you need. 🙂
0 Kudos
Message 4 of 4
(2,501 Views)