LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find the total number of elements in a multi dim array

Solved!
Go to solution
How do I find the total number of elements in a single or multi dim array? For example, a 2x3 array has 6 elements, and a 2x3x4 has 24. How do I compute this very easily - is there a single VI that does this? David
0 Kudos
Message 1 of 4
(2,916 Views)
Solution
Accepted by DEppAtNGC

Use "array size" (array palette) followed by "multiply array elements" (numeric palette)

 

 

(Works also equally well for 3D arrays and higher)

For a 1D array, just use "array size". 😉
Message Edited by altenbach on 02-05-2009 05:57 PM
Message 2 of 4
(2,913 Views)
Thanks... I was looking for the multiply, but couldn't find it because it doesn't look like a multiply sign - it looks like PI... but I'm not complaining... I like pie...
0 Kudos
Message 3 of 4
(2,897 Views)

Similar to the S for addition, the P is standard for the product, see e.g. http://mathworld.wolfram.com/Product.html. 🙂

 

 

Message 4 of 4
(2,881 Views)