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!