필터 지우기
필터 지우기

Random number time series

조회 수: 5 (최근 30일)
Bdayz
Bdayz 2016년 9월 13일
댓글: Bdayz 2016년 9월 13일
Hi All,
I will like to generate Independent normally distributed data with linearly
increasing mean from say 2 to 4 and constant standard deviation, say 1.
Thank you.

채택된 답변

s.p4m
s.p4m 2016년 9월 13일
편집: s.p4m 2016년 9월 13일
ln = 100; % length of timeseries
Ts = 1; % timestep
for k = 1:ln
tmp_mean = 2+2*(k-1)/(ln-1); % your linearly increasing mean
tmp_devi = 1; % your constant standard deviation
x(k,1) = random('norm',tmp_mean,tmp_devi,1,1);
end
timeseries = iddata(x,[],Ts);
  댓글 수: 1
Bdayz
Bdayz 2016년 9월 13일
Thanks very much. works perfectly

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by