Be the first to rate this file! 14 Downloads (last 30 days) File Size: 1.93 KB File ID: #29755

Signal Processing blocks

by

 

The folder contains 2 m-files: 1) intg.m 2)mpointaverage.m

| Watch this File

File Information
Description

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.

Required Products DSP System Toolbox
MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us