0

我想要一个 3d 频谱图这是我到目前为止所做的。

urlwrite('http://goo.gl/D1uAn','sample.wav');
%reads from web and saves the wav file in local folder with name sample.wav
%this might not save the file if so please download the file from the link

[W,fs]=wavread('sample');
%[W,fs]=wavread(FileName);

[~,~,T,P]=spectrogram(W(:,end),200,200/2,256,fs);
%[~,~,T,P]=spectrogram(W(:,end),tres,tres/2,fres,fs);
I=flipud(-log(P));
% I is the image of spectrogram in 2D matrix now

% I want to plot this spectrogram in 3d
h = surf(I.*-1);
set(h, 'edgecolor','none');

%this does the job however it is very blocky I want to smooth this
4

1 回答 1

1

如果你增加你的重叠,它会更平滑:

[~,~,T,P]=spectrogram(W(:,end),200,199,256,fs);

但也需要更长的时间来计算。这就是权衡。

于 2013-07-11T14:51:14.253 回答