Hello
This is what the documentation states:
StdDev Method
Syntax
CWStat.StdDev x, MeanValue, StdDev
Purpose
Computes the standard deviation and the mean (average) values of the input array.
Parameters:
x As Variant
[Input] One-dimensional input array.
MeanValue As Variant
[Output] Mean value.
StdDev As Variant
[Output] Standard deviation.
The StdDev procedure does not return a value, so its not a function.
All you need is to pass the variables as a function parameter, and the procedure should return the mean and std deviation values in the variables.
You can copy and paste the following code inside a VB callback and see how the function works. Make sur you have a CWDSP1 and CWStat1 control dropped on the UI before runni
ng this
Dim meanv As Variant
Dim std As Variant
Const n = 1024
Dim amp As Variant, phase As Variant, cycles As Variant
Dim x As Variant
amp = 1
phase = 0
cycles = 2
x = CWDSP1.SinePattern(n, amp, phase, cycles)
CWStat1.StdDev x, meanv, std
Hope this helps
Bilal Durrani
NI
Bilal Durrani
NI