how to create an vector contains 10000 random values that uniformly distributed with mean 1 and variance 10 ?

조회 수: 3 (최근 30일)
how to create an vector contains 10000 random values that uniformly distributed with mean 1 and variance 10 ?

채택된 답변

Torsten
Torsten 2019년 3월 7일
편집: Torsten 2019년 3월 7일
mean = 1.0;
std = sqrt(10);
N = 10000;
u = (mean-sqrt(12)/2*std) + sqrt(12)*std*rand(N,1)
u is uniformly distributed on
[a:b] = [m-sqrt(12)/2*std:m+sqrt(12)/2*std]
with the prescribed mean and standard deviation.

추가 답변 (1개)

Adam
Adam 2019년 3월 7일
편집: Adam 2019년 3월 7일

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by