How can I generate a pseudo random column vector V

조회 수: 3 (최근 30일)
Ihor
Ihor 2022년 12월 5일
댓글: Jon 2022년 12월 6일
for N = [1 2 5 10.^[ 1 : 5 ] ]
V = rand( N, 1 ) ; % I'm not sure if it should look like this
end
I have this cycle, how can I generate a pseudo random column vector V of varying length N (using this cycle)

답변 (1개)

Jon
Jon 2022년 12월 5일
Yes this will make a random column vector of length N at each iteration.
The values will be uniformly distributed between 0 and 1. If you want them normally distributed use randn.
  댓글 수: 2
Ihor
Ihor 2022년 12월 5일
Thank you!
Jon
Jon 2022년 12월 6일
Glad that helped. If that answered your question please accept the answer so that others who might have a similar problem will know that an answer is available.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by