From: david on
Hello, i am not very good at matlab but i need to implement this in matlab,


Y(z) = 1 - z exp -1
X(z) = 1 - 0.95*z exp -1

H(z) = Y/Z

This is a DC removal filter.
From: Faraz Afzal on
"david " <int78005(a)stud.uni-stuttgart.de> wrote in message <i0qost$fvu$1(a)fred.mathworks.com>...
> Hello, i am not very good at matlab but i need to implement this in matlab,
>
>
> Y(z) = 1 - z exp -1
> X(z) = 1 - 0.95*z exp -1
>
> H(z) = Y/Z
>
> This is a DC removal filter.

Hi David,

Use either of the given two in simulink to serve the purpose of DC removal

Discrete FIR filter, or Discrete filter...
Regards,
Faraz
From: david on
hi, i need to programm it not to use simulink
From: Faraz Afzal on
"david " <int78005(a)stud.uni-stuttgart.de> wrote in message <i0qost$fvu$1(a)fred.mathworks.com>...
> Hello, i am not very good at matlab but i need to implement this in matlab,
>
>
> Y(z) = 1 - z exp -1
> X(z) = 1 - 0.95*z exp -1
>
> H(z) = Y/Z
>
> This is a DC removal filter.

y = [1 -1]
x = [1 -0.95]
[z ,p ,k] = tf2zp(y,x)

Regards,
Muhammad Faraz
From: Wayne King on
"david " <int78005(a)stud.uni-stuttgart.de> wrote in message <i0qost$fvu$1(a)fred.mathworks.com>...
> Hello, i am not very good at matlab but i need to implement this in matlab,
>
>
> Y(z) = 1 - z exp -1
> X(z) = 1 - 0.95*z exp -1
>
> H(z) = Y/Z
>
> This is a DC removal filter.

If this is the filter you want to implement, I think you want the pole just inside the unit circle at z=1 and the zero on the unit circle at z=1 so,

A = [1 -0.95]; % this gives you a pole at z=0.95+j0
B = [1 -1]; % this gives you a zero at z=1+j0

zplane(B,A); % see the pole-zero plot
fvtool(B,A); % see the magnitude response


I think the constant-coefficient difference equation you are going for is:

y(n)-0.95*y(n-1)=x(n)-x(n-1)

Wayne