フィルターのクリア

Generating random streams marginally different

1 回表示 (過去 30 日間)
Kian
Kian 2015 年 4 月 1 日
コメント済み: Kian 2015 年 4 月 1 日
Is there anyway in Matlab to generate streams of random normal numbers that are marginally different? By that I mean if the first stream would look like:
[-0.9625 0.8736 0.8499 1.6579 0.6706 -2.3623 -0.7797 -0.5591 0.8103 2.9868]
then the next stream would be similar to the first stream, maybe something like:
[-0.6321 0.9430 0.7002 1.3456 0.2832 -2.0011 -1.0188 -0.5932 1.1120 2.8932]
and so on with the next streams (each stream be similar to the other ones already generated).
Is there already any tools in Matlab doing this?
Thank you,
Kian
  1 件のコメント
Andrew Newell
Andrew Newell 2015 年 4 月 1 日
Perhaps a random walk might do it - depending on what you wanted the streams for.

サインインしてコメントする。

採用された回答

John D'Errico
John D'Errico 2015 年 4 月 1 日
編集済み: John D'Errico 2015 年 4 月 1 日
A statistician might say you wanted to generate a pair of correlated random variables. mvnrnd would help here.
Lacking that, you could just do this...
A = randn(1,10);
B = A + randn(size(A))/10;
Note that this is equivalent to a specific covariance matrix, so a similar stream could be gained from mvnrnd.
  3 件のコメント
John D'Errico
John D'Errico 2015 年 4 月 1 日
編集済み: John D'Errico 2015 年 4 月 1 日
Yes. It was just a shifty shift key at fault.
Kian
Kian 2015 年 4 月 1 日
Thank you for your answer. With your answer I realized I had mixed up something.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by