How do I design filters using Z transfer functions?

I have a paper on ECG segmentation, and need to develop an algorithm using Matlab that involves among other things, developing 2 filters (a Low Pass Differentiator and a First-Order Low Pass Filter) that have the following transfer functions:
Gdiff(z)=1-z^(-6)
and
Gsmooth(z)=(1-z^(-8))/(1-z^(-1))
Any suggestions are welcome. Thank you.

2 Comments

z = tf('z', Ts); % Ts is your sampling time
Gdiff = 1-1/z^6;
In any case, do
doc tf
that will provide you with all you need to know about transfer functions in Matlab.
Thank you very much for the insight, but is there any way to convert the transfer function into a filter?

Sign in to comment.

 Accepted Answer

It is straightforward to convert transfer function to filter (in theory) to filter coefficients, as shown in the following wiki
For example, you Gdiff is an FIR filter with coefficients of [1 0 0 0 0 0 -1]

More Answers (0)

Community Treasure Hunt

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

Start Hunting!