# Filter Design Basics

1 vue (au cours des 30 derniers jours)
Matlab2010 le 16 Avr 2012
Hello.
I have a simple filter H(z) = 1 - z^-1
I can see my filter by writing:
b = [1 -1];
freqz(b,1);
what I would like to know is how to get this into the format for the filter design toolbox.
eg
d=fdesign.lowpass('N,Fc',80,0.5);
Hd=design(d);
freqz(Hd);
In my case, what would i be passing to fdesign.m, or design.m.
I know they should give the same answer, but with a different plot.
Or is it not possible to get the plotyy output if you know your filter coefficents?
thank you!!
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponse acceptée

Wayne King le 16 Avr 2012
Are you saying you already know the filter coefficients? In
H(z) = 1-z^{-1}
you have a high pass filter and you can create a filter object like design() would produce with:
Hd = dfilt.df1([1 -1],1);
fvtool(Hd);
If you do not already have the filter coefficients, then you can design the filter with fdesign and design and obtain the coefficients.
##### 2 commentairesAfficher AucuneMasquer Aucune
Matlab2010 le 16 Avr 2012
Yes I already have the coefficents.
The above is great. thank you.
One question -- the output does not give me a phase response? Can I get it to?
Wayne King le 16 Avr 2012
Yes, you can do:
[phi,w] = phasez(Hd);
% or
b = [1 -1];
[phi,w] = phasez(b,1);

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Filter Design dans Help Center et File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by