04-17-2013 07:05 AM
hi
i have an 1d intialized array
i want to take the existed array and for example add +1 for the 5th element
how can it be done?
thanks
Solved! Go to Solution.
04-17-2013 07:09 AM
Just use the function Replace Array Subset (http://zone.ni.com/reference/en-XX/help/371361H-01/glang/replace_array_subset/)
04-17-2013 07:16 AM
If you have a newer version of LV, the In Place Element Structure can simplify this.
Lynn
04-17-2013 07:46 AM
In a typical application you would want to repeat that operation to form a simple histogram. This is most easily achieved by keeping the array in a shift register and repeating the operation in a FOR loop until all data is processed.
My very simple example from a few years ago can be found here. In this case we are counting the number of occurences of small integers in a 1D array. Modify as needed.