Signal Processing blocks

The folder contains 2 m-files: 1) intg.m 2)mpointaverage.m
522 Downloads
Updated 17 Dec 2010

View License

1)intg.m
Description:
This m-file implements a digital integrator.
The equation for a digital integrator is:
y(n)=y(n-1)+0.5*T*[x(n)+x(n-1)];
T-interval length
Syntax:
y=intg(input,intv);
The argument 'input' is the input sequence.
The argument 'intv' is T,the interval length.
'y' is the output sequence. It is of the same length as the input sequence.
[y h]=intg(input,intv);
The argument 'h' gives the impulse response for the integrator.
[y h]=intg(input,intv,'fig')
The extra argument 'fig' plots the input sequence, the output sequence and the impulse response of the integrator.
2)mpointaverage.m
Description:
This m-file implements a M-point moving average system.
The equation is:
y(n)=(x(n)+x(n-1)+.....+x(n-M))/M;
M is the order of the M-point moving average system.
Syntax:
y=mpointaverage(input,order)
The argument 'input' is the input sequence.
The argument 'order' is T,the order of the M-point moving average system.
'y' is the output sequence.It is of the same length as the input sequence.
[y h]=mpointaverage(input,order)
The argument 'h' gives the impulse response for the M-point moving average system.
[y h]=mpointaverage(input,order,'fig')
The extra argument 'fig' plots the input sequence, the output sequence and the impulse response of the M-point moving average system.

Cite As

Yashwant Marathe (2024). Signal Processing blocks (https://www.mathworks.com/matlabcentral/fileexchange/29755-signal-processing-blocks), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0