Use MATLAB to compute a 6-point moving average

조회 수: 1 (최근 30일)
mariam mohamed alyassi
mariam mohamed alyassi 2018년 12월 7일
편집: Prem Kumar Tiwari 2018년 12월 13일
Use MATLAB to compute a 6-point moving average of the input signal, x[n] = 5sin(pi n /10 + pi/ 4) , for 0 lowest than or equal n greater than or equal 69. Display a MATLAB plot of the output signal.

답변 (1개)

Prem Kumar Tiwari
Prem Kumar Tiwari 2018년 12월 13일
편집: Prem Kumar Tiwari 2018년 12월 13일
movmean is a function in Matlab, detailed here.
It can be used to quickly compute the moving average of a vector. If you have a matrix (collection of vectors), as it is apparant from you question. You can repeat movmean over all the vecotors of a matrix.
You've to use value of k to be 6, as you asked in question. Explore the link to learn more about it.
Feel free to explore Plots, to learn more about 2 and 3 dimensional plots in Matlab.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by