How to get 10000 variable numbers between the range of 0 and 100?
Mostra commenti meno recenti
i want a variable array of 10000 numbers from 0 to 100.
a = -5; b = 5; varx = a + (b-a).*rand(10000,1); varX = 10.^varx;
so i want this in the above format.
can you help me out?
4 Commenti
Md. Atiqur Rahman
il 27 Ago 2022
a=randi([0,100],[1,10000])
or,
a = -5 + (5+5)*rand(1,10000)
Star Strider
il 27 Ago 2022
Note that because of:
varX = 10.^varx;
and the set limits, ‘varx’ will be between
and
. Is that what you want?
Aniket Dutta
il 28 Ago 2022
Star Strider
il 28 Ago 2022
Risposta accettata
Più risposte (1)
Abderrahim. B
il 27 Ago 2022
Spostato: Image Analyst
il 27 Ago 2022
Try this --
varx = 100*rand(10000, 1) ;
min(varx)
max(varx)
Categorie
Scopri di più su Random Number Generation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!