Jump to content

Average of data into array


leen

Recommended Posts

Hi,

I read in an input. Every second the value of the input ( 0 or 1) stored in an array.

After 1 minute I have 60 values into the array list.

Then I want to calculate the average value of all values to know how many times the input is high into 1 minute.

But there is no function to get direct the result, only i.e. to get the minimum or maximum value.

To calculate on a way by 1 to 1 it's very long-winded.

Is there a function what I can use or a simply way to fixe this.

Best regards

Leen

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...