ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mathematical Operation On Arrays

Solved!
Go to solution

Hi

 

Hope someone can help me with this. How do I (add, subtract..etc) each element between 2 arrays or more. Lets's say I have an array1 with element (5,10,15,20)  and array2 with (2,4,6,8)  . I need to multiply 5 with 2, then 4, then 6, then 8 and then 10 with 2,4,6,8.....and the list goes on....all the multiplied valued show also be shown in a new array....

 

Thanks

0 Kudos
Message 1 of 5
(4,048 Views)

Like this?

 

array.JPG

0 Kudos
Message 2 of 5
(4,036 Views)
Solution
Accepted by topic author Coco Banana
array1.JPG
Message 3 of 5
(4,035 Views)
You have not specified what kind of output you want. The above answers produce a 2D array. If you want a 1D array, you can reshape later, e.g. as described here. (In the case of multiplication, you can also use the outer product).
Message 4 of 5
(4,027 Views)
I had suggested the reshape array as well/
Message 5 of 5
(3,996 Views)