Blank plot on my computer
Show older comments
This is my code and I was wondering why is my figure 6 empty:
https://dontpad.com/labpdsmiki
3 Comments
John D'Errico
on 16 May 2024
Instead of forcing people to go to a possibly dangerous link, why not just show your code here? Why should we trust that that link will be what you say it is?
Mihaela-Roxana
on 16 May 2024
Edited: the cyclist
on 16 May 2024
Mathieu NOE
on 16 May 2024
you have a problem with your butterworth filters :
[bd1,ad1]=impinvar(bs1,as1,Fs);
bd1 is only NaN values , so everything you filter with this is going to be NaN and you end up with blank figure
Also , important information : you are designing very high order analog butterworth filters , to then transform them in digital form with impinvar (why not then directly use the digital butter way ?)
second info : you get NaN because your filters are unstable :
It is best not to use the transfer function implementation of discrete (digital) filters,because those are frequently unstable. Use zero-pole-gain and second-order-section implementation instead.
%Example :
fc = 50;
fs = 1e4;
[z,p,k] = butter(6,fc/(fs/2));
[sos1,g1] = zp2sos(z,p,k);
figure(1)
freqz(sos1,2^16,fs)
Answers (0)
Categories
Find more on Signal Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





