What does rng(seed,''5normal") actually means and what they are controlling while generating the matrices?

1 回表示 (過去 30 日間)
AMAN
AMAN 2025 年 3 月 13 日
回答済み: Walter Roberson 2025 年 3 月 13 日
rng(42,"v5normal")
n=50;
p=10;
r=7;
U=mvnrnd(zeros(r,1),sqrt(1)*eye(r),n);
U=randn(n,r);
V=mvnrnd(zeros(r,1),sqrt(1)*eye(r),p);
V=randn(p,r);
X=U*V';

回答 (1 件)

Walter Roberson
Walter Roberson 2025 年 3 月 13 日
According to https://www.mathworks.com/help/matlab/ref/randstream.html#mw_cc34b6ad-c7e6-4943-b21b-7d7310a4dd52 "v5normal" corresponds to generator keyword shr3cong
According to https://www.mathworks.com/help/matlab/ref/randstream.html#mw_cc34b6ad-c7e6-4943-b21b-7d7310a4dd52 generator keyword shr3cong is "Shift-register generator summed with linear congruential generator", with no stream support and a period of 2^64

カテゴリ

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

製品


リリース

R12.1

Community Treasure Hunt

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

Start Hunting!

Translated by