10-29-2009 11:16 AM
With this example I can get positives and negatives numbers in Numeric
But for me, the "minus" don't mean anything
Example:
If I have "100 -200" for me the greater value is -200
but if I compare bouth values I received 100 as greater value
I do the same calc for 3 differents variables like A, B, C
and after that I have to calc which value is the "greater"
But my problem is, If I have the values "-350 300 -400"
the greater will be "300" but for me the "minus" don't mean anything
so I need the greater value is "-400"
For all positive values, its works fine!
I compare A and B, after that the greater is compared with C and have a result!
but When I have negative values and positive values... I got that problem...
and When I have only negative values I have a problem too.
"-300 -400 -500" for me the greater value have to be "-500" but labview shows "-300"
because -300 is greater than -500 in algebriac.
And If I use absolute values I will always have a positive value... but I need to know if the value is negative or positive
Anyone, can help me with that?
Thanks
Solved! Go to Solution.
10-29-2009 11:19 AM
10-29-2009 11:22 AM
Ben
10-29-2009 11:27 AM
Yes, I already do it with absolute values
but If the "greater" value is the negative one.. I need to know that
so I have to find a way that it shows me if the number is positive or negative
I have "300 400 -500" with absolute values I will receive 500 as greater value
but the real greater value is -500 not 500
Thanks
10-29-2009 11:29 AM - edited 10-29-2009 11:30 AM
Ok all,
How about this.
it returns just the magnitude not the nasty sign that is meaningless to the OP
10-29-2009 11:36 AM
EduU wrote:Yes, I already do it with absolute values
but If the "greater" value is the negative one.. I need to know that
so I have to find a way that it shows me if the number is positive or negative
I have "300 400 -500" with absolute values I will receive 500 as greater value
but the real greater value is -500 not 500
Thanks
Please look at that sample code again.
The abs value is just used to decide which element had the largest magnitude. I then index out the original value as per your desire.
Ben
10-29-2009 11:39 AM
Well Jeff, this way still gives me only positive values
because x² make any negative number positive
I will try explain my point again
I have to get the greater number even the number is negative
and when i have that number i have to plot it with the signal
Like I have 5 numbers "100 144 -155 -200 -298"
The greater number is 298
so I have to plot it like: -298
If I use absolute values, ok i will find 298... but I will think it is a positive values
when it is a negative value
Now you guys understand me?
10-29-2009 11:41 AM - edited 10-29-2009 11:43 AM
10-29-2009 11:44 AM - edited 10-29-2009 11:47 AM
Well the Ben explain is right..
sorry at the first time I saw I missunderstood it.
Really apreciate that... I thought for like 2 hours and don't figure out any way to do that
and you did it in 10 seconds haha
Thanks
10-29-2009 11:56 AM
EduU wrote:Well the Ben explain is right..
sorry at the first time I saw I missunderstood it.
Really apreciate that... I thought for like 2 hours and don't figure out any way to do that
and you did it in 10 seconds haha
Thanks
Message Edited by EduU on 10-29-2009 11:47 AM
10 seconds after 11 years of practice.
Ben