From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I generate a random number of a specified range?

Solved!
Go to solution

I need to know ho to generate a random number like this shows. http://zone.ni.com/reference/en-XX/help/371361E-01/lvtextmath/msfunc_randperm/

 

The issue is I have know idea how to do it. I know I can generate from 0 to 1 but I need to be able to set the range.

0 Kudos
Message 1 of 2
(17,232 Views)
Solution
Accepted by topic author dpkiley

Scale the random number

untitled.PNG

And add a Dbl to Int conversion since the Math function returns an int

 


"Should be" isn't "Is" -Jay
Message 2 of 2
(17,221 Views)