How to 'clean' data using moving average window filter
5 ビュー (過去 30 日間)
古いコメントを表示
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
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?
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!