how to add noise with vairience 0.002 in the code with mean 0
a = -1;
b = 1;
g = a + (b-a).*rand(1,250);
x = zeros(1,250);
k = zeros(1,250);
v = 0.01*randn(1,250);
for n = 1:250
k(n) = g(n) + 0.5*g(n)*g(n)*g(n);
end
for t = 6:250
x(t) = 0.8*(x(t-1) – 0.3*x(t-2) – 0.105*x(t-3) + 0.059*x(t-4)) …
+ 0.6*(x(t-2) – 0.3*x(t-3) – 0.105*x(t-4) + 0.059*x(t-5)) …
+ 0.4*(k(t-1) – 0.3*k(t-2) – 0.105*k(t-3) + 0.059*k(t-4)) …
– 0.2*(k(t-2) – 0.3*k(t-3) – 0.105*k(t-4) + 0.059*k(t-5)) …
+ v(t);
end
now i have to generate noise signal with variance 0.002 and mean 0,how to write codea = -1;
b = 1;
g = a + (b-a).*rand(1,250);
x = zeros(1,250);
k = zeros(1,250);
v = 0.01*randn(1,250);
for n = 1:250
k(n) = g(n) + 0.5*g(n)*g(n)*g(n);
end
for t = 6:250
x(t) = 0.8*(x(t-1) – 0.3*x(t-2) – 0.105*x(t-3) + 0.059*x(t-4)) …
+ 0.6*(x(t-2) – 0.3*x(t-3) – 0.105*x(t-4) + 0.059*x(t-5)) …
+ 0.4*(k(t-1) – 0.3*k(t-2) – 0.105*k(t-3) + 0.059*k(t-4)) …
– 0.2*(k(t-2) – 0.3*k(t-3) – 0.105*k(t-4) + 0.059*k(t-5)) …
+ v(t);
end
now i have to generate noise signal with variance 0.002 and mean 0,how to write code a = -1;
b = 1;
g = a + (b-a).*rand(1,250);
x = zeros(1,250);
k = zeros(1,250);
v = 0.01*randn(1,250);
for n = 1:250
k(n) = g(n) + 0.5*g(n)*g(n)*g(n);
end
for t = 6:250
x(t) = 0.8*(x(t-1) – 0.3*x(t-2) – 0.105*x(t-3) + 0.059*x(t-4)) …
+ 0.6*(x(t-2) – 0.3*x(t-3) – 0.105*x(t-4) + 0.059*x(t-5)) …
+ 0.4*(k(t-1) – 0.3*k(t-2) – 0.105*k(t-3) + 0.059*k(t-4)) …
– 0.2*(k(t-2) – 0.3*k(t-3) – 0.105*k(t-4) + 0.059*k(t-5)) …
+ v(t);
end
now i have to generate noise signal with variance 0.002 and mean 0,how to write code noise MATLAB Answers — New Questions









