How to fastly generate a series of complex Gaussian vectors under given covariance matrix Q ?
12 ビュー (過去 30 日間)
古いコメントを表示
I have a covariance matrix Q, which is complex positive semidefinite and its dimension is
. Now i want to generate L column vectors
(with the same distribution),where
. Then store it in
, which is a
matrix.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1821292/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1821293/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1821294/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1821295/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1821296/image.png)
How to fastly obtain this H?
0 件のコメント
回答 (1 件)
Ayush Aniket
2024 年 12 月 18 日
One of the ways you can generate the H matrix is by using the Cholesky decomposition to transform standard normal random vectors into vectors with the desired covariance structure.
You can use the chol MATLAB function to decompose the covariance matrix Q. Since Q is positive semidefinite, you can use a modified Cholesky factorization that handles complex matrices. The final step is to create a matrix of standard normal random variables and multiply them by the Cholesky factor to obtain the desired vectors. Refer the code below:
% Cholesky decomposition of Q
% Use 'chol' with 'lower' option to get the lower triangular matrix
A = chol(Q, 'lower');
% Generate L standard normal vectors of dimension N
Z = (randn(N, L) + 1i*randn(N, L)) / sqrt(2); % Complex standard normal
% Transform to obtain the desired distribution
H = A * Z;
Refer to the following documentation to read about chol function: https://www.mathworks.com/help/matlab/ref/chol.html#mw_ffc71c97-36a0-4335-8e05-82ecff3e6312
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!