From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
moderator1983

Random number function with option of including/excluding the endpoints

Status: Declined

National Instruments will not be implementing this idea. See the idea discussion thread for more information.”

I have seen the request of Random number function improvement, however further to that, my wish is to have an option to include or exclude the endpoints (just like In Range and Coerce Function).

 

Random Number with option


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


14 Comments
Darin.K
Trusted Enthusiast

The chances that you screw up and the new function returns 0 is probably greater than the chances the existing function returns 0.  How do you guard against that?  Easy.  You still check at the input of the affected function when needed, this way you catch all kinds of errors both known and unknown.  Subtraction, multiplication, and Sin(x) could all give 0, do we check their outputs as well?  There are a million ways to get a zero, stopping them at the source strikes me as a doomed effort.  You may still let one slip.

 

 

AristosQueue (NI)
NI Employee (retired)

Darin -- all this is is wrapping the random function in something that checks it -- no different than doing exactly what you suggest and then doing "create subVI". I've done that for any number of upstream functions. And this one is a bit different since the thing you need to do is go back upstream and re-roll.

Darren
Proven Zealot
Status changed to: Declined

National Instruments will not be implementing this idea. See the idea discussion thread for more information.”

Darren
Proven Zealot

We are working on adding a Random Number (Range) VI to a future LabVIEW release. We are not intending to include the ability to exclude the range limits. This functionality has limited use with floating point numbers, and explicit range values can be specified for the integer implementation.