sample and function "time"?
sample and function "time"?
(OP)
Hello sorry for my poor english but there's no forum about Labview in french...
i've 2 questions:
- i import a matrix from a .txt file and i want to calculate the mean and standard deviation but labview take only a sample to calculate and not the whole population... how can i have the mean and standard deviation of the whole pop??
- is there a function to return the exact time in which labview do the calcul? (as tic-toc in matlab)??
it 's for my studies and i need to do a benchmark.... so i need to know in how many time labview can calculate a mean of a 250x32000 matrix.
i hope you've understand what i wanted to say...
thank you!
i've 2 questions:
- i import a matrix from a .txt file and i want to calculate the mean and standard deviation but labview take only a sample to calculate and not the whole population... how can i have the mean and standard deviation of the whole pop??
- is there a function to return the exact time in which labview do the calcul? (as tic-toc in matlab)??
it 's for my studies and i need to do a benchmark.... so i need to know in how many time labview can calculate a mean of a 250x32000 matrix.
i hope you've understand what i wanted to say...
thank you!





RE: sample and function "time"?
What version of LV are you using?
Also refer to help and search or display context help on the functions I call out below for further information.
I figured out the 1st question:
Assuming you have a 2 dimesion array, consisting of the following, for example:
1,2
3,4
5,6
To do stats, you need to use the reshape array function. You need to know the total number of elements to wire into the reshape array function. In this case I already knew it was 6 so I cheated and wired a constant.
But you could also use the array size function (it would return a 1 dimension array with elements of 3 (#rows) and 2 (#columns)) and then follow that with the multiply array elements function to get 6 (3x2=6).
Now that the 2 day array has been reshaped to a 1 d array, wire the 1 d array into the standard deviation and variance function. Viola, you now have an average of 3.5 and a std dev of 1.87 for the data shown above.
I wish I could post an attachment, it took 5 times longer to describe it to you than it took to figure it out, wire up and run it.
By the way, your English is good. I may have a solution to your 2nd question soon, if time permits.
Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.