using normrnd function in a loop
Mostra commenti meno recenti
If I use normrnd function in a loop, every times that normrnd runs in a new loop it will give me the same number? ( if I set parameters to a constant value);
for i = 1 :10
x(i) = normrnd(1,0.2);
end
Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 12 Set 2013
rng(14) % choose your seed
for i = 1 :10
x(i) = normrnd(1,0.2)
end
Categorie
Scopri di più su Loops and Conditional Statements 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!