# LabVIEW

cancel
Showing results for
Did you mean:

## sample and function "time"?

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!
Message 1 of 6
(1,912 Views)

## Re: sample and function "time"?

Hello fabfab1,

here it comes...
To get the time of a subvi/function/whatever you have to make a sequence and get timer value before and after the operation.
To get the mean of a 2D-array you have to convert this array to a 1D for usage of the "Mean/StdDev" function (analyze->math->probability).

Hope this helps,
GerdW
Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(1,905 Views)

Try this code.
Randall Pursley
Message 3 of 6
(1,902 Views)

## Re: sample and function "time"?

Hello fabfab1,

just a comment:
Keep in mind you're working on very big data structures: 250*32000=8000000 entries - double precision needs 8 byte per entry - giving you a 64 million byte data chunk! It's probably better to split up your data into smaller chunks to avoid heavy usage of a swap file...
And using LabView7.1 on an AthlonXP 2200+ my example takes about 0.75 seconds.

Best regards,
GerdW
Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 6
(1,897 Views)

## Re: sample and function "time"?

Also...

Forum for LabVIEW in French:
http://forums.ni.com/ni/board?board.id=4170

You can get there by changing the "Select a Community" drop-down box in the upper right-hand corner of the page to "French." It looks like the French-language community is really getting a lot of traffic, too!

--John
Message 5 of 6
(1,891 Views)

## Re: sample and function "time"?

That's ok!! Thank you for all!! your files were exactly what i wanted!
Message 6 of 6
(1,882 Views)