Home
Community
Discussion Forums
Most Active Software Boards
LabVIEW
Topic
LabVIEW
Register
·
Login
·
Help
Community
Category
Board
Documents
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Topic Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Mute
Printer Friendly Page
All Forum Topics
Previous Topic
Next Topic
Formula Node (Numeric Comparision by using AND, OR functions)
Formula Node (Numeric Comparision by using AND, OR functions)
M_Atif
Member
02-24-2007
05:03 AM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
Dear All,
I want to compare my input if it is in the
range of/between
0.00 and 0.5 it should return/output 0.5, how i can do this in Formula Node.
e.g
If (x>=0 and X<=0.5)
y=05;
if (x>0.5 and x<=1)
y=1;
if (x>1 and x<=2)
y=2;
0
Kudos
Message
1
of 3
(2,679 Views)
Reply
Re: Formula Node (Numeric Comparision by using AND, OR functions)
GuenterMueller
Active Participant
02-24-2007
07:59 AM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
Hello M.
As long as your logic does not get much longer I would recommend a conditional evaluation like
y =
(x>=0.0 && x<=0.5) ? 0.5 :
(x>0.5 && x<=1.0) ? 1.0 :
(x>1.0 && x<=2.0) ? 2.0 : -1;
I hope you like it, Guenter
0
Kudos
Message
2
of 3
(2,672 Views)
Reply
Re: Formula Node (Numeric Comparision by using AND, OR functions)
M_Atif
Member
Author
02-25-2007
12:06 AM
Options
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report to a Moderator
Thanks Guenter,
Its first time that i Got so accurate response from NI. But only thing that i want to know was how i can use OR function like AND (&&) you already explained in a well maner.
0
Kudos
Message
3
of 3
(2,657 Views)
Reply
All Forum Topics
Previous Topic
Next Topic