make a point varies
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
how to generate three points on matlab, where the middle one varies?
2 Kommentare
Rik
am 20 Mai 2020
You probably need the rand function, but with this little detail it is hard to give a specific example.
Antworten (1)
Walter Roberson
am 20 Mai 2020
When A and B are the lower bound and upper bound respectively, then
A + rand() * (B-A)
will be a random point between the two.
This should not return A or B exactly as outputs in normal operation, but could do so in the extreme case that A and B are in the range eps(realmin) to eps(realmin)*2^52 (2.2250738585072e-308)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Random Number Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!