anyone pls give me a detailed description of what this code is doing ??? thxx
Mostrar comentarios más antiguos
t=0 : 0.1: 30; x=10*sin (2*pi.*t/20);
figure;plot(t,x,'k','linewidth',2); xlabel('time,s'); ylabel('amplitude');
n=randn(size(t)); xn=x+n;
hold on; plot (t,xn);
wn=-5 : 1 : 5;
xc=xn;
for i = 6 : 1 : length(t) - 5
xc(i) = mean(xn(i + wn));
end
hold on; plot(t,xc,'q','linewidth',2);
2 comentarios
Andrew Newell
el 20 de Mzo. de 2011
Run one line at a time. See what it does. And look at the documentation, e.g., "doc randn".
Oleg Komarov
el 20 de Mzo. de 2011
And format the code with teh code button for improved readability of your post.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!