syntax for random number
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i need a syntax that generate one number in random from a range of numbers.
Can anyone tell me the syntax,
this is a python function random.randrange(50, 500, 10) i need the function which works in matlab
0 commentaires
Réponses (4)
madhan ravi
le 8 Avr 2019
https://in.mathworks.com/help/matlab/ref/rand.html - see under Topics , you will find lot of resources
0 commentaires
Steven Lord
le 10 Avr 2019
Take a look at the randi or randperm functions.
If you need to generate numbers from a set that contains non-integer values, or a set that is not consecutive integers, use those functions to generate an index and use linear indexing to extract the appropriate numbers from the set.
0 commentaires
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!