LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sum array elements not working

I am trying to output the average % standard deviation per point for a series of data sets.  To do this I want to use the sum array elements function.  The program I have written should work I am pretty sure, but when I watch data flow through it, 1000 points get input into the sum function and NaN comes out.  What could cause an error like this?  I have tried inverting my array, etc.  Is there a limit to the number of points the function can take?  Or to the precision of the points being input?  Thanks, this is driving me crazy! 
 
 
[I renamed the file and attached it again so you can open it - Molly K]

Message Edited by Support on 07-06-2005 08:23 AM

Download All
0 Kudos
Message 1 of 5
(3,311 Views)
 Please reattach your file with a reasonable file name. (e.g. no % sign). Currently, it cannot be downloaded.
0 Kudos
Message 2 of 5
(3,303 Views)
Any arithmetic operation on a NaN value is invalid and must result in NaN as well. You probably need to make sure first that your array doesn't contain NaN, Inf, and -Inf.

Rolf Kalbermatter

Message Edited by rolfk on 07-05-2005 11:37 AM

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 5
(3,301 Views)
Yes, my array did have an NaN in it (I was just using a bunch of instrument noise).  My sanity has returned.  Thanks! 
0 Kudos
Message 4 of 5
(3,293 Views)
If you are just doing an average, you can sort the array and filter out the non-numeric values which will be clustered together.  This is a quick and dirty trick, but beware, the compute time goes up exponentially with array size so use it with caution. 
 
Sheldon
Technical geek, engineer, research scientist, biodegradable...
0 Kudos
Message 5 of 5
(3,285 Views)