LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure design

Solved!
Go to solution

Hi all,

 

I am currently developing a small program.

The inputs are 3 values(integers) : x, y, z

How do I design the program to determine: "Is there any value LESS than 25% of the HIGHEST value?", if yes, exclude that value.

Kind Regards,

 

Adrian

0 Kudos
Message 1 of 4
(2,269 Views)

What do you mean by "exclude that value"?  What do you want to do with values that are not "excluded"?  Do you want place the values into an array?

 

Build the 3 values into an array.  Find the Maximum of the array.  (Array palette).  Take 25% of that number and compare it to the elements of the array.

0 Kudos
Message 2 of 4
(2,261 Views)

Hi,

 

I am using those 3 values for a multiply calculation.

 

However, the initial condition is that, if a value is less than 25% of the highest value, I have to create an option to allow user to exclude it from the calculation (Hence, only 2 values multiply).

I have put those 3 values into an array, and using Max & min, I know which one is the max, and multiply that by 0.25, and now I am stuck how to build it.

0 Kudos
Message 3 of 4
(2,254 Views)
Solution
Accepted by topic author Adi_1017

 


Adi_1017 wrote:

However, the initial condition is that, if a value is less than 25% of the highest value, I have to create an option to allow user to exclude it from the calculation (Hence, only 2 values multiply).


 

This is not general enough! What if 2 values are less than 25%?

Should these values be excluded automatically or how should the options be presented to the user?

What kind of output do you want?

 

Here is some simple code that create an output array containing only the elements that are greater than 25% of the highest value. Modify as needed.

 

0 Kudos
Message 4 of 4
(2,249 Views)