LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average majority of element of array

Solved!
Go to solution

Dear Friends,

As beginner user of lab view struggling with this problem which I can explain it by an example

my array:

 8 8 8 7 8 9 9 7 24 14

I would like to calculate the average of majority of elements which is 8

any help or hint would be highly appreciated  

0 Kudos
Message 1 of 7
(4,124 Views)

@arvin1947 wrote:

Dear Friends,

As beginner user of lab view struggling with this problem which I can explain it by an example

my array:

 8 8 8 7 8 9 9 7 24 14

I would like to calculate the average of majority of elements which is 8

any help or hint would be highly appreciated  


I don't understand.  The average of the majority of the elements, the way you describe it, will always be that number!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 7
(4,122 Views)

Maybe it would help if you gave us the expected answer.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 7
(4,119 Views)

Hi Bill,

 

My expected answer is 8 in this case

thanks

0 Kudos
Message 4 of 7
(4,094 Views)

My expected answer is 8 but in this case it is not, I would like to be able to delete out range numbers

0 Kudos
Message 5 of 7
(4,093 Views)
Solution
Accepted by arvin1947

It sounds like you're looking to calculate the mode? If so, LabVIEW has a built-in VI found at Mathematics > Prob & Stat > Mode.vi


GCentral
Message 6 of 7
(4,076 Views)

Use Mode.vi as suggested by cbutcher and Provide the interval as 0 and use multi model if multiple numbers share same amount of repetition.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 7
(4,044 Views)