zero phase spectrum and filtfilt function
2 ビュー (過去 30 日間)
古いコメントを表示
Fs = 1; % Sampling Frequency
N = 50; % Order
Fc1 = 1/f1;%7s % First Cutoff Frequency
Fc2 = 1/f2; % Second Cutoff Frequency
flag = 'scale'; % Sampling Flag
% Create the window vector for the design algorithm.
win = hamming(N+1);
% Calculate the coefficients using the FIR1 function.
[b,a] = fir1(N, [Fc1 Fc2]/(Fs/2), 'bandpass', win, flag);
% Hd = dfilt.dffir(b);
out=filtfilt(b,a,data);
if using filter function ,we can get spectrum and phase using fvtool , while using filtfilt , how can i get the two lines?
0 件のコメント
採用された回答
Star Strider
2015 年 6 月 4 日
With your [b,a] vectors, use the freqz function to get the Bode plot.
2 件のコメント
Star Strider
2015 年 6 月 5 日
What do you mean ‘zero phase spectrum’?
The Bode plot gives you the magnitude and phase. That’s all you need.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Digital Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!