From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sum array of clusters column

Solved!
Go to solution

How can i sum an array of clusters anyone column? Like attachmend array of clusters  example.

0 Kudos
Message 1 of 5
(2,686 Views)
Solution
Accepted by topic author keremgeliz

Use a shift register on your FOR loop to hold the sum.  You add the current sum with the current cluster's value and put the value in the shift register.  You will need one for each sum you want to take.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(2,682 Views)

Thank for your help now its working perfectly.

0 Kudos
Message 3 of 5
(2,675 Views)
Solution
Accepted by topic author keremgeliz

Try this:

 

 

Download All
Message 4 of 5
(2,670 Views)

@keremgeliz wrote:

Thank for your help now its working perfectly.


No, that's not good:

 

  • You are creating extra array allocations, just to take the sum later and reduce it back to a single number.
  • Your shift registers has absolutely no purpose because you never use their value and never initialize them.

Compare with my solution above.

0 Kudos
Message 5 of 5
(2,666 Views)