Effacer les filtres
Effacer les filtres

writing normally distributed error code

1 vue (au cours des 30 derniers jours)
Lina Alhelo
Lina Alhelo le 2 Juin 2019
Modifié(e) : Lina Alhelo le 3 Juin 2019
Hello all,
I have an equation
Y = aX + E.....
E is error term that is N ~ ( 0 , [ 25 0 ; 0 25] ) , how I can write a code for E in this case know that it will be 2 x1 matrix size. that is normally distibuted with 0 mean and 25 standard deviation
Thank you in advance.
  5 commentaires
Bjorn Gustavsson
Bjorn Gustavsson le 3 Juin 2019
I typically use something like this for scalar white noise with standard deviation proportional to the sqrt(intensity):
I = I_ideal + I_ideal.^.5*randn(size(I_ideal));
Maybe the documentation to normrnd gives you more information?
HTH
Lina Alhelo
Lina Alhelo le 3 Juin 2019
Modifié(e) : Lina Alhelo le 3 Juin 2019
Thank you very much, your help was valuable.

Connectez-vous pour commenter.

Réponse acceptée

Bjorn Gustavsson
Bjorn Gustavsson le 2 Juin 2019
Have a look at: randn, and normrnd.
HTH

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by