12-12-2011 11:30 AM
I will try to explain my problem with an example, since in the computer I don't have labVIEW installed.
I have 10 numbers and multiply it for 10 other numbers
and of course i will have 10 results, after it I have to show the meddium value of this 10 results and have to show the signal that most appear (+ or -)
My problem is to show the signal, if I have 7 negative numbers and 3 positive numbers, how can I measure it and show the negative signal in the final?
example:
-0,3 -0,8 1 0,3 0,6 -0,7 -0,1 -0,5 0,3 -0,4
So i have to put in the final:
- 0,5
Thanks
Solved! Go to Solution.
12-12-2011 12:11 PM
12-12-2011 12:53 PM
Well I need the mean of the numbers, this I already know how to make
and I need the mode, example I have 7 negative numbers and 3 positive numbers so the majority is negative,
the final result will be the mode with the mean, like: - 0,5
Sorry but without LabVIEW in this computer I couldn't figure a better wat to explain it =/
12-12-2011 12:58 PM
You are not precise enough. Do you mean the geometric mean, arithmetic mean, or median. If you do not know the meaning, you should look it up in wikipedia.
12-12-2011 01:21 PM
@EduU wrote:
Well I need the mean of the numbers, this I already know how to make
and I need the mode, example I have 7 negative numbers and 3 positive numbers so the majority is negative,
the final result will be the mode with the mean, like: - 0,5
I count 6 negative numbers in the example you provided. Also, for the example provided the mode is 0.3. I don't undersand what "the mode with the mean" is supposed to errrr... mean. I don't see where you got -0.5 as the final answer.
12-12-2011 01:34 PM - edited 12-12-2011 01:35 PM
Here is code that gives you -0.5 from the given data. Still, sounds pretty useless. 😄
12-13-2011 05:57 AM
Joseph loo, Sorry but I only need to know if there are more negative or positive numbers, The numbers I put is just an example.
smercurio_fc, I got - 0,5 because I use absolut values, but don't need to focus on the value.
altenbach, Thanks for the picture, but I don't need calculate the value, I only need to see if there are more negatives or positive values.
I attached a picture that I have 5 numbers, 3 negatives and 2 positives, I only need to know how can I know that I have more negative numbers, remember this is an example.
12-13-2011 06:30 AM
You can do something similar (simplified) than altenbach proposed:
If the output is True your array has more positive numbers.
12-13-2011 06:33 AM
Thanks dan_u! This is exactly what I need.