필터 지우기
필터 지우기

How to 'clean' data using moving average window filter

조회 수: 6 (최근 30일)
timetry2
timetry2 2019년 10월 13일
편집: timetry2 2019년 10월 13일
How would I go about 'cleaning' the data by using a moving average window filter, using a window size of 5 and plotting this part in a new figure. I added the line of code y2 = movmean(y,5) but it is not giving me the results I need. Thank you in advance.
  댓글 수: 2
Image Analyst
Image Analyst 2019년 10월 13일
Then try a different window width. What do you need? Why do you say the moving mean window with a window width of 5 is no good (not "clean")? Are you saying that the mean within the window is not accurate - not the true mean due to a bug in movmean()? What exactly does "not giving me the results I need" mean?
timetry2
timetry2 2019년 10월 13일
I am trying to get two different plots in the same figure and the way I have the code I believe it is overlapping the figures. How would I get the second subplot that looks exactly the same with just the y2 = movmean(y,5) difference?

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2019년 10월 13일
Try this:
subplot(1, 2, 1);
plot(y, 'LineWidth', 2);
title('y', 'FontSize', 16)
subplot(1, 2, 2);
plot(y2, 'LineWidth', 2);
title('y2', 'FontSize', 16)
grid on;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by