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 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeTime Series についてさらに検索

質問済み:

2016 年 9 月 13 日

コメント済み:

2016 年 9 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by