LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Variance for a set of real time data

Solved!
Go to solution

Hi,

 

I am continuously acquiring a set of sensor data through LABVIEW with a sampling rate of 100Hz (100samples per sec). What I want to do is to find the variance of the set of data every 0.1s. Im collecting the acquired sensor data into a 1D array "SensorData." Then wat I want to do is each time 10 new samples are collected, I want to find the variance. I tried using the variance ptbypt but it always outputs a value 0.0

 

Your help is greatly appreciated.

 

Thanks!

 

Chathuri 

0 Kudos
Message 1 of 6
(3,111 Views)
Solution
Accepted by topic author Chathuri

What is the sample length you specified in Variance PtbyPt vi? Did you check the initialize condition?

 

How exactly you are calling this subVI?. To get a variance output of 0.1 second, you might want to set your sample lenght to 10.

 

Could you post a VI which shows this value?

 

If you are seeing 0.0, try to expand you numeric indicator, there might be an exponential value at the end :smileywink:

0 Kudos
Message 2 of 6
(3,102 Views)

Yes, I feel so stupid. I left the indicator to display values of 2 decimal places. I increased the significant digits and now I am getting a value 🙂 Thankyou!

 

Chathuri

0 Kudos
Message 3 of 6
(3,099 Views)
And I thought I solved your problem. :smileymad:
0 Kudos
Message 4 of 6
(3,093 Views)
🙂
0 Kudos
Message 5 of 6
(3,078 Views)
Oh I was right!! :smileyvery-happy:
0 Kudos
Message 6 of 6
(3,076 Views)