@mkeintz wrote: @s_lassen - Somehow I overlooked your response, which preceded mine substantially. Wouldn't have been so expansive in my explanation if I had seen it. Yes, by all means let array have an index range of 0 to ndate-1 instead of 1 to ndate. I didn't want to overburden the OP with what I suspected would be more new knowledge than wanted. However, I'm not sure your program as presented does what is intended. In particular the "sum=sum(of points{*})" follows (rather than precedes) resetting of the array to missing. Actually, the "setting of the array to missing" only concerns the elements that were not set by this ID's observations, in case there were fewer observations than wanted.
... View more