LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding array elements with its previous value

Solved!
Go to solution
Solution
Accepted by muks

You should really consider doing the operations "in place" especially since you know the final array size.

Here is an example that would initialize an array of the final size and then replace elements with new data as they arrive.

It will be MUCH more gentle on memory management. Trust me!

Modify as needed (there could be bugs.)

 



Message Edited by altenbach on 06-10-2008 12:54 PM
Message 11 of 13
(854 Views)

GerdW is right, the '0' at the add function must be replaced by the shift register. And as Altenbach mentioned, your application is the ideal example of applying inplaceness since you know the exact size of the array.

KostasB

NIUK Applications Engineering

Message 12 of 13
(827 Views)

Thanx altenbach .I missed out declaring initialize array with a NAN and also was stuck on how to increment the index on corresponding iterations.Thanx a ton for all your efforsts.


Message 13 of 13
(820 Views)