Signal Processing blocks
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
Platform Compatibility
Windows macOS LinuxCategories
- Signal Processing > Signal Processing Toolbox > Digital and Analog Filters > Digital Filter Design >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
DSPblocks/
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |