Define a vector with random steps
Mostra commenti meno recenti
I want to create a vector that has incremental random steps, I've used this simple code.
t_inici=(0:10*rand:100);
The problem is that the random keeps unchangable between steps. Is there any simple way to change the seed of the random number within each step?
thanks.
Risposte (1)
John D'Errico
il 23 Mar 2018
Ye gods. Why would you need to change the seed?
You want it to start at 0, and end at 100? In 10 steps?
t_inici = [0,sort(rand(1,8)*100),100];
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!