LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ignore Inf during operation

Hi,
I'm cablibrating a set of thermocouples and want to get a standard deviation to see how well they are tracking each other. The problem is that I don't always have all channels connected, but don't want to change my array size when a junction is open. My DAQ card returns -9999 when it detects an open junction, which is fine. However, if I pass it an array of 8 values, and 4 of them are -9999, that has a big effect on the summary statistics. I tried using a comparison to replace -9999 with NaN in the array, but it seems to treat those as Inf, which also affects the standard deviation.

What I'd really like is something like the NaN toolbox for Matlab, which will conduct matrix operations ignoring NaNs... Does anyone have any simple suggestions? 

Thanks,
mike
0 Kudos
Message 1 of 3
(3,753 Views)
Before you take the aggegate value of the array, you could sort the array and use the sub-array that does not contain -9999.
That would be SORT:THRESHOLD:SUB-ARRAY:AVERAGE
0 Kudos
Message 2 of 3
(3,751 Views)
That'll do the trick...

thanks,
mike
0 Kudos
Message 3 of 3
(3,747 Views)