Pole-zero plot with blackman window, FIR filter - GUI

Hi everyone,
I'm working on a GUI and I want to make pole-zero plot with blackman window (together with fir1 function) but it doesn't work. Other windows works good, however blackman plot not. I used pzplot, pzmap and zplane functions. What should I do?
b = fir1(rzad,Wn,blackman(rzad+1));
Hz=tf(b,1);
axes(handles.axes6)
h = pzplot(Hz);
%pzmap(Hz)
%zplane(b,1)
grid on

 採用された回答

Star Strider
Star Strider 2017 年 5 月 26 日

0 投票

The Signal Processing Toolbox tf function requires as its argument a digital filter object created by the designfilt function. It will not give you the result you want, since you have already calculated the numerator of your transfer function as ‘b’.
There is also nothing wrong with the use of the Blackman window.
this works for me:
rzad = 21; % Create Data
Wn = [0.3 0.7]; % Create Data
b = fir1(rzad,Wn,blackman(rzad+1));
zplane(b,1)
grid on
I cannot determine the problem with this plot and your GUI. Your filter design and the plot work.

2 件のコメント

Aleksandra Jankowska
Aleksandra Jankowska 2017 年 5 月 27 日
Thank for your answer. Yes, the plot work but when I click once more on the button then chart increases to the entire window and all of controlls disappear.
Star Strider
Star Strider 2017 年 5 月 27 日
My pleasure.
I cannot comment on your GUI problems.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by