How to get specific signal from an audio file

1 回表示 (過去 30 日間)
Lolipop
Lolipop 2015 年 9 月 29 日
コメント済み: Walter Roberson 2015 年 9 月 30 日
I am trying to extract Electrical Network Frequency signal and plot it like frequency vs time from an uncompressed audio file (.wav)
I tried to do something like this:
[y,fs]=wavread('exercise.wav');
t=0:1/fs:(length(y)-1)/fs;
figure(1);
plot(t,y);
L = 512;
window=hamming(L);
noverlap=floor(L/2);;
nfft=1024;
figure(2);
view(0,90);
spectrogram(y,window,noverlap,nfft,fs);
But all I got are two graphics without ENF signal in them.
Anybody knows how to get Electric Netowrk Signal form audio file?

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 9 月 29 日
  2 件のコメント
Lolipop
Lolipop 2015 年 9 月 29 日
This answer you gave me predict that I am using 50Hz network, but this signal could be recorded with 60Hz power network..
Walter Roberson
Walter Roberson 2015 年 9 月 30 日
If you cannot read that source and make the three trivial changes to the code, then you clearly do not understand the code and need to study it before you hand in your homework assignment.

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

カテゴリ

Help Center および File ExchangeSignal Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by