butter is not working
Ältere Kommentare anzeigen
when ever i use butter and filter function to plot,nothing is shown in my output screen.Except butter code output all other outputs are shown
12 Kommentare
Mathieu NOE
am 23 Jul. 2021
hi
it would be more efficient it you woud share your code & data ...
tx
Scott MacKenzie
am 23 Jul. 2021
Bearbeitet: Scott MacKenzie
am 24 Jul. 2021
No output using butter? Try the code below. Do you get any output on your screen?
fc = 300;
fs = 1000;
[b,a] = butter(6,fc/(fs/2));
freqz(b,a)
But, really, how do you expect a helpful answer given the absence of detail in your question. As @Mathieu NOE notes, post your code and data.
MICHKEL ANGLO J
am 24 Jul. 2021
MICHKEL ANGLO J
am 24 Jul. 2021
Scott MacKenzie
am 24 Jul. 2021
I ran your code and I get a subplot with four graphs. Apparently you are not getting the 4th graph. Please post the output graph you are getting.
MICHKEL ANGLO J
am 24 Jul. 2021
Scott MacKenzie
am 24 Jul. 2021
Hmm, that's wierd. What version of MATLAB are you running?
What about plotting something simple in subplot(4,1,4) -- just to narrow down the problem. Try commenting out lines 29-35 in your code (as posted above) and inserting...
subplot(4,1,4);
bar(rand(3));
Here's what I get:

Chunru
am 24 Jul. 2021
Are you sure you are running the same code as you posted? Can you step through the code in debug mode?
MICHKEL ANGLO J
am 24 Jul. 2021
Scott MacKenzie
am 24 Jul. 2021
I'm only asking you to do this (create a bar chart in position 4) for debugging.
MICHKEL ANGLO J
am 24 Jul. 2021
Chunru
am 25 Jul. 2021
Try "which butter" or "dbstop in butter".
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


