I would just create a zero-filled array of size [2*Window+1] and replace each location in one swoop. Here is one possibility.
You seems to count elements starting with "1" as the first element. Real labview programmers start counting at zero! 😉 It would make the code a bit simpler.
(You might still need to adjust for "edge effects" because it is not clear how you want to handle cases at the ends of the array, e.g. if the center of the window is already outside, but the "edge" of the window still hits an existing element. For example, in your case it would make equal sense to zero the first element in the array.)
Message Edited by altenbach on 01-20-2007 01:42 PM