LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mean and standard deviation point by point

Solved!
Go to solution

Hi All,

 

I would like to ask for advice for my 2 subVIs:

In my subVI I use the Mean point by point VI (Mean PtByPt VI, in my other subVI I calculate standard deviation, but its very similarly structured ). I give as an input a finite sample length, lets say 80. So I want to calculate the mean of the newest 80 elements. But I want to get the result first when the puffer is full, because I need good statistic. Since this VI starts to give result already from the first call, I need to workaround this. Should I hack inside this "system VI", or should I use an uninitialized shift register in my subVI next to this mean function, to see if I had already 80 calls or not?

 

thanks!

0 Kudos
Message 1 of 4
(4,471 Views)

I have decided not to modify the system function. I have attached my subVI, could you give me advice, if it is good, or not good approach?

(I call this subVI by passing it temperature values, and It should calculate if the temperature equilibrated yet or not, but only giving logical true output, when the sample length is reached)

 

Thanks very much!

0 Kudos
Message 2 of 4
(4,461 Views)
Solution
Accepted by topic author Blokk

It looks like it should work.

 

As you decided, it is not a good idea to modify VIs in vi.lib.  Other code may depend on the the original function and at the next LV update all your work might be lost when the update replaces your modified VI with the one from the NI update.  Any time you want to use a vi.lib VI as a starting point, first save a copy with a new name and new location, then modify that.

 

You could save a bit of effort by using the In Range and Coerce function.  You need to change the input to not Include Lower Limit.

 

Lynn

 

Comparisons.png

Message 3 of 4
(4,436 Views)

Thanks very much for the advice!

0 Kudos
Message 4 of 4
(4,427 Views)