# LabVIEW

cancel
Showing results for
Did you mean:

## How to find the between value of one limit to another limit and also find the percentage of between values.

Hi Everyone,

I want to find the between values in the array. For example:- I give 95 to 115, the values between 95 to 115 will be shown in the array indicator. After I find how many percent of value present in between (95 to 114) ; (114 to 135) ; (135 to 155); (155 to 170) ; (170 to 200) out of 200. This is a problem I am facing in my part of my coding.

I do this concept but I don't know it is right or wrong...

And program file is also attached below.

Message 1 of 7
(868 Views)

## Re: How to find the between value of one limit to another limit and also find the percentage of between values.

Finding the values is ok as you get the values you need where you need it. Maybe you will find a better (more compact) way to do it instead of X for loops.

But when your are making the percentage computing, this is wrong if I'm understanding correctly.

You need to know how many values there is in each array and divide this by the number of values in the starting array, then use array size instead of summing values.

Correct me if i've misunderstood.

Message 2 of 7
(852 Views)

## Re: How to find the between value of one limit to another limit and also find the percentage of between values.

OK, I WILL TRY THIS THANK YOU FOR YOUR COMMENT.....

Message 3 of 7
(837 Views)

## Re: How to find the between value of one limit to another limit and also find the percentage of between values.

@Defaphe wrote:

Finding the values is ok as you get the values you need where you need it. Maybe you will find a better (more compact) way to do it instead of X for loops.

But when your are making the percentage computing, this is wrong if I'm understanding correctly.

You need to know how many values there is in each array and divide this by the number of values in the starting array, then use array size instead of summing values.

Correct me if i've misunderstood.

Use a histogram of Input Array[ ].  This will give you a count of values between limit pairs as an array<call that H[ ].  100*H[ ] / (Size(Input Array[ ])+1) will yield an array of bin sizes as percent of population.

"Should be" isn't "Is" -Jay
Message 4 of 7
(822 Views)

## Re: How to find the between value of one limit to another limit and also find the percentage of between values.

Thank you so much I will try this also...

Message 5 of 7
(748 Views)

## Re: How to find the between value of one limit to another limit and also find the percentage of between values.

@guru13 wrote:

Thank you so much I will try this also...

Don't forget to post back with your revised code!

"Should be" isn't "Is" -Jay
Message 6 of 7
(738 Views)

## Re: How to find the between value of one limit to another limit and also find the percentage of between values.

while the code is attached below........

Message 7 of 7
(687 Views)