1.代码
%加载一个蓝鲸音频数据的文件,信号中有两种声音。一种是颤音,另一种是呻吟声。 clear; clc; [y,fs]=audioread('bluewhale.wav'); %sound(y,fs); %听音频 whale=timetable(y,'SampleRate',fs); figure(1) stackedplot(whale); %HHT imf=emd(whale,'MaxNumIMF',3,'Display',1); %Use the computed IMFs to plot the Hilbert spectrum of the signal. Restrict the frequency range %from 0 Hz to 1400 Hz. figure(2) hht(imf,'FrequencyLimits',[0 1400]) figure(3) [hs,f,t] = hht(imf,'FrequencyLimits',[0 1400]); mesh(seconds(t),f,hs,'EdgeColor','none','FaceColor','interp') xlabel('Time (s)') ylabel('Frequency (Hz)') zlabel('Instantaneous Energy')
2.运行结果