How to create a complex normal i.i.d.?

38 vues (au cours des 30 derniers jours)
Gn Gnk
Gn Gnk le 27 Oct 2019
Commenté : Gn Gnk le 27 Oct 2019
Hello ,
i want to create a i.i.d CN(0,σ^2)
I create the variable like that :
x=sqrt(var/2)*(randn+1i*randn);
Is this correct?
  2 commentaires
Bjorn Gustavsson
Bjorn Gustavsson le 27 Oct 2019
Does that satisfy your definition of a complex normal distribution? Does it fit with for example the definitions here: Complex_normal_distribution?
Gn Gnk
Gn Gnk le 27 Oct 2019
I just want to know how to convert it to matlab code and if this : x=sqrt(var/2)*(randn+1i*randn);
is correct or not.
Thank you.

Connectez-vous pour commenter.

Réponse acceptée

John D'Errico
John D'Errico le 27 Oct 2019
Is it correct? It is what it is. You are creating a rotationally symmetric complex random variable, where if we define the variance to be
N = 1e7;
V = 3;
X = sqrt(V/2)*(randn(N,1) + i*randn(N,1));
Does it have zero mean? That is trivial, yes. The population mean is clearly zero, and the sample mean will approach zero as N-->inf.
Xbar = mean(X)
Xbar =
0.0002026 - 0.00027059i
Vbar = (X-Xbar)'*(X - Xbar)/(N-1)
ans =
2.999
As you can see, the sample variance seems to approach 3. I could spend some time to verify the expected value of that result for the population, done in symbolic form. But I can as easily just say that is is "correct".
  1 commentaire
Gn Gnk
Gn Gnk le 27 Oct 2019
Thank you a lot sir!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by