Generation of rundon numbers with different scales
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello!
I got a vector which is
M= [3.452, 3.235, 5.453, 0.0000045, 0.0000065]
and I want to generate a vector of random values that I can add to M, i.e. every value of the vector has to be about the same orther than the original value.
How could I do that?
Thank you so much
댓글 수: 0
답변 (1개)
the cyclist
2019년 11월 5일
You aren't very specific, but the following will generate random values scaled by the value in M.
r = 0.1*M.*randn(size(M))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!