LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect the sign of a number?

Solved!
Go to solution

I have output which gives either negative number or positive number. My problems is how to detect the sign of the number and output boolean value? For example if input number is negative like -23.11 I want to output false and if the number is positive like 17.99 I want to output true.

 

T H A N K S!

0 Kudos
Message 1 of 7
(5,094 Views)
Solution
Accepted by topic author Jick
Test whether the number is larger or equal Zero.
Message 2 of 7
(5,089 Views)

Hi Jick,

 

Maybe you should look at the Comparison palette.

Things like smaller/greater than 0 and smaller/greater and Equal to 0

Message 3 of 7
(5,086 Views)
Unbenannt.PNG
0 Kudos
Message 4 of 7
(5,082 Views)
Thanks guys! I tried to think too complicated. 🙂
0 Kudos
Message 5 of 7
(5,080 Views)
Message Edited by Phillip Brooks on 07-16-2009 11:08 AM
0 Kudos
Message 6 of 7
(5,045 Views)

There is also a Sign vi, for future reference.  However in this case that check against 0 gives you the boolean directly, and is more useful

 

untitled.PNG

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 7 of 7
(5,036 Views)