Random number generator with max and min values included in the matrix
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I would like to know how to add minimum and maximum values to a matrix of random generated numbers but I am unable to find anything abou that.
This is the code I am using
xmin=mel2; %mel2 is 401.97
xmax=mel; % mel is 4.6871e+03
n=25; % number of random generated values in the matrix
x=sort(xmin+rand(1,n)'*(xmax-xmin));
0 Commenti
Risposte (1)
Vedere anche
Categorie
Scopri di più su Random Number Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!