How to plot this signal?
Ältere Kommentare anzeigen
Hi everyone, Can anybody tell me how to define this function and plot it in Matlab?
X(n) = X(n-1)+ 0.9 e(n)
where e(n) is a white,gaussian noise signal, and X(n) is a stationary, gaussian AR(1) process
1 Kommentar
Negar
am 20 Feb. 2011
Akzeptierte Antwort
Weitere Antworten (6)
Negar
am 20 Feb. 2011
0 Stimmen
Negar
am 20 Feb. 2011
0 Stimmen
zohar
am 20 Feb. 2011
Hi Negar
l = 1000;% length of the signal
x = zeros(l,1);
Noise = 0.9*randn(l,1);
% sorry I meant the first element of x, x(1) not x(0)
%assuming x(1) = 0 or somthing else
for n = 2: length(x)
x(n) = x(n-1)+ Noise(n);
end
% or you can use
x (2:length(x)) = x(1:length(x)-1) + Noise(2:length(x));
plot(1:l,x)
I start with n=2 because x(1) allready defined 0.
Negar
am 20 Feb. 2011
0 Stimmen
Negar
am 20 Feb. 2011
0 Stimmen
Kategorien
Mehr zu Spectral Estimation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!