From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead 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!
0 Kudos
Message 1 of 6
(2,407 Views)
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
0 Kudos
Message 2 of 6
(2,400 Views)
Try this code.
Randall Pursley
0 Kudos
Message 3 of 6
(2,397 Views)
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
0 Kudos
Message 4 of 6
(2,392 Views)
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
0 Kudos
Message 5 of 6
(2,386 Views)
That's ok!! Thank you for all!! your files were exactly what i wanted!
0 Kudos
Message 6 of 6
(2,377 Views)