07-23-2020 04:07 PM
I need help with an issue:
How to create a random incremental number ( eg: 0, 1, 1.5, 2, 2.34, 2.45, ....)
random numbers created within a range , BUT always larger than the previous.
Note;
no not the normal random number generator of 0-1 , need values to be random, but rising.
07-23-2020 04:19 PM - edited 07-23-2020 04:19 PM
What have you tried so far?
The requirements seem sparse. You can create an array of random numbers, get them into the range you need, and then sort the 1D array.
We may need more information though. See this guide on how to ask questions that get the information you need: Ask Smart Questions
07-23-2020 04:32 PM
What are the inputs? (number of elements, lower range limit, upper range limit)
Some ideas:
07-23-2020 06:13 PM
LabVIEW gives you a Random Number generator that gives you values in the range (0, 1). Let R1 be the first such Random Number. To get the second, add another U(0, 1) to the previous, i.e. R2 = R1 + U(0,1). Now R3 = R2 + U(0, 1). This generates an always-increasing sequence, as you requested.
Bob Schor
07-24-2020 03:47 AM - edited 07-24-2020 03:49 AM
Integral x(t) PtByPt.vi:
Put a wait in the loop... But without the loop the integral will reset each run.
07-24-2020 07:04 AM
If you have OpenG Numeric Library, they have a function called Random Number Within Range, and you can easily build out some logic to get the randomness you want...
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
07-24-2020 07:11 AM - edited 07-24-2020 07:11 AM
LV2020 has that. Random Number (Range).vi...
07-24-2020 01:06 PM