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);

更多回答(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