obtaining values major than 10e-7
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Antworten (1)
Azzi Abdelmalek
am 15 Sep. 2012
x = rand*10e-7
3 Kommentare
Azzi Abdelmalek
am 15 Sep. 2012
Bearbeitet: Azzi Abdelmalek
am 15 Sep. 2012
x = 2*rand*10e-7
%you will have randomly > or <
Siehe auch
Kategorien
Mehr zu Signal Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!