obtaining values major than 10e-7
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I use rand function to generate values
x = rand;
after that I compared generated values to
10e-7
if x > 10e-7
do something
end
unfortunately rand generates values always bigger 10e-7. How can I generate values that are less than 10e-7 using rand function?
1 Commento
Risposte (1)
Azzi Abdelmalek
il 15 Set 2012
x = rand*10e-7
3 Commenti
Azzi Abdelmalek
il 15 Set 2012
Modificato: Azzi Abdelmalek
il 15 Set 2012
x = 2*rand*10e-7
%you will have randomly > or <
Vedere anche
Categorie
Scopri di più su Signal Processing Toolbox 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!