FIR by using Frequency Sampling Methods

Hi everyone,
Can anybody tell me how can I design FIR filters (low pass, high pass, bandpass and stopband) by using Frequency Sampling Method. In MATLAB, I can't found a specific function to design these filters by using frequency sampling method like other methods such as window or optimal that include a specific function in MATLAB like kaiser, boxcar or firpm.
Please help me
Thank you

Answers (2)

3 Comments

(firls) is for Least square linear-phase FIR filter design not for Frequency Sampling method.
thanks
Then this
http://www.mathworks.com/help/toolbox/signal/ref/fir2.html
Honglei you are right with the fir2 function, but this function not ideally method to design filters by frequency sampling but combine the window method with frequency sampling (Hamming window is the default). That's why I asked this question by only Frequency Sampling method.
Thanks for your answer.

Sign in to comment.

Hi Mohammed, you can use frequency sampling with certain fdesign objects and specifications like fdesign.arbmag for example
b1 = 0:0.01:0.18;
b2 = [.2 .38 .4 .55 .562 .585 .6 .78];
b3 = [0.79:0.01:1];
a1 = .5+sin(2*pi*7.5*b1)/4; % Sinusoidal response section.
a2 = [.5 2.3 1 1 -.2 -.2 1 1]; % Piecewise linear response section.
a3 = .2+18*(1-b3).^2; % Quadratic response section.
f = [b1 b2 b3];
a = [a1 a2 a3];
n = 300;
d = fdesign.arbmag('n,f,a',n,f,a); % First specifications object.
% use frequency sampling to design the filter
hd = design(d,'freqsamp','window',{@kaiser,.5}); % Filter.
fvtool(hd)
You can use designmethods to query which design methods are supported for a given specification.
For example: Design a very simple lowpass filter using fdesign.arbmap
d = fdesign.arbmag('N,F,A',10,[0 0.25 0.5 1],[1 1 0 0]);
designmethods(d)
Hd = design(d,'freqsamp');

1 Comment

Thanks for your answer, but as I know 'freqsamp' is for arbitrary magnitude responses not for common response....

Sign in to comment.

Tags

Asked:

on 20 Jun 2012

Community Treasure Hunt

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

Start Hunting!