-
-
Save GiovanniBalestrieri/6a15a79fe02e6f023c8b to your computer and use it in GitHub Desktop.
Snippet - Basic Matlab Filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Filter Design | |
% Designs a second order filter using a butterworth design guidelines | |
[b a] = butter(2,0.2,'high'); | |
% Plot the frequency response (normalized frequency) | |
figure(3) | |
H = freqz(b,a,floor(num_bins/2)); | |
plot(0:1/(num_bins/2 -1):1, abs(H), 'r'); | |
hold on | |
grid on | |
plot(0:1/(num_bins/2 -1):1,X_magsNorm(1:num_bins/2),'g') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment