obtaining values major than 10e-7
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Azzi Abdelmalek
2012 年 9 月 15 日
x = rand*10e-7
3 件のコメント
Azzi Abdelmalek
2012 年 9 月 15 日
編集済み: Azzi Abdelmalek
2012 年 9 月 15 日
x = 2*rand*10e-7
%you will have randomly > or <
参考
カテゴリ
Help Center および File Exchange で Signal Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!