LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to sum parts of an array

Hello,

I have a little problem to sum parts of an array.
It´s a 2D array. The first column one is the counter e.g. 1 to 1000, the second are the digits.
For example I want to assume the worthes from position 5 to 15, how can I realize it?

thx

0 Kudos
Message 1 of 2
(2,937 Views)

Wire the array into Index Array and wire 1 into the column input to get the second column. Then, wire the resulting array into Array Subset and wire 5 and 11 into the inputs. Wire the resulting array into Add Array Elements (Numeric palette) and you will get the sum of those elements.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
Message 2 of 2
(2,926 Views)