×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

sample and function "time"?

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!

RE: sample and function "time"?

fabfab1:

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources