anyone pls give me a detailed description of what this code is doing ??? thxx
이전 댓글 표시
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
Andrew Newell
2011년 3월 20일
Run one line at a time. See what it does. And look at the documentation, e.g., "doc randn".
Oleg Komarov
2011년 3월 20일
And format the code with teh code button for improved readability of your post.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!