필터 지우기
필터 지우기

How to change order for different filters?

조회 수: 4 (최근 30일)
Giggs B.
Giggs B. 2021년 7월 7일
댓글: Star Strider 2021년 7월 9일
Hi,
I have 2 questions:
[y2,fs]=audioread('room.mp3');
y_h2=highpass(y2,1000,fs);
n=filtord(y_h2);
  • I have an audio file and I am doing signal processing over that audio file such a passing it though various filters. But I wanted to change order of those filters at my own will. How can I do that?
Thanks.

채택된 답변

Star Strider
Star Strider 2021년 7월 7일
Those functions have a second output, the digitalFilter object. Return that and all the information you want about the type of filter and the order will be available.
Example —
s = rand(1, 5000);
Fs = 1000;
fpass = 50;
[sfilt,df] = lowpass(s, fpass, Fs, 'ImpulseResponse','iir');
df
df =
digitalFilter with properties: Coefficients: [3×6 double] Specifications: FrequencyResponse: 'lowpass' ImpulseResponse: 'iir' SampleRate: 1000 PassbandRipple: 0.1000 StopbandAttenuation: 60 PassbandFrequency: 50 StopbandFrequency: 120.6500 DesignMethod: 'ellip' Use fvtool to visualize filter Use designfilt to edit filter Use filter to filter data
.
  댓글 수: 12
Giggs B.
Giggs B. 2021년 7월 9일
Got it, I was able to use the filters this way. Thanks :)
Star Strider
Star Strider 2021년 7월 9일
As always, my pleasure!
.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Filter Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by