フィルターのクリア

Plot/visualise only filtered Hz from Highpass

2 ビュー (過去 30 日間)
Annika
Annika 2022 年 10 月 27 日
コメント済み: Annika 2022 年 10 月 31 日
I have runned a highpass on a wav. file (see code under) as I'm just looking for high frequency areas (see spectrogram). How can i plot (visualise) only the filtered part of the highpass function. aka. I don't want to have both the original and filtered signal in the same plot, just the filtered signal (high frequency) which I'm interested in.
Code:
[x,fs] = audioread("doubleclick4.wav")
N = length(x);
t = (0:N-1)/fs;
N/fs
highpass(x,500,fs)
ylim([-1 1])
spectrogram(x,750, 675,750,fs,'yaxis')
(Greetings from MATLAB nuub)

採用された回答

Shivansh
Shivansh 2022 年 10 月 31 日
Hello!
Based on my understanding you want only plot of filtered signal.
You can refer to output arguments section of the documentation attached below-
As mentioned in the document that highpass function returns two variables as output.
First variable is y, which is filtered signal and other variable is d which is digitalFilter Object.
So you can make minor modification in your code to achieve only the plot of filtered signal.
The code which can help you to achieve this is given below-
[x,fs] = audioread("sample.wav");
N = length(x);
t = (0:N-1)/fs;
[y,~]=highpass(x,500,fs);
plot(y);
Hope it helps!
  1 件のコメント
Annika
Annika 2022 年 10 月 31 日
Thank you! Exactly what I needed :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by