MATLAB: Writing normally distributed error code

errornormally distributed

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.

Best Answer

  • Have a look at: randn, and normrnd.
    HTH