필터 지우기
필터 지우기

Moving average with two different windows

조회 수: 2 (최근 30일)
Max1234
Max1234 2023년 4월 2일
답변: Image Analyst 2023년 4월 2일
Hello guys,
I am evaluating a large amount of data. To get some insight out of this, I'm looking at a moving average. The problem is that above a certain value X, the amount of data becomes significantly larger. So I need a moving average before this value X that has a different window than after this value. Is it possible to create different intervals with different windows of the moving average and display this in a graph?
Many thanks in advance!

채택된 답변

Image Analyst
Image Analyst 2023년 4월 2일
Yes. Let's say that you have a vector and X is 5000, you can do the filtering in two steps
smooth1 = movmean(signal(1:X), windowSize1);
smooth2 = movmean(signal((X+1):end), windowSize2);
smoothedSignal [smooth1, smooth2];

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Generation and Preprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by