can anyone help me out from this Undefined function 'fftOneSide' for input arguments of type 'double' matlab error
1 次查看(过去 30 天)
显示 更早的评论
Here is full code & error,
filename = 'D:\ME_3rd sem\hiral mam\1\pooja_matlab\data\data\s5.wav';
[y,fs]= audioread(filename);
%y=au.signal;
%fs=au.fs;
%nbits=au.nbits;
n=512;
t=(1:n)'/fs;
startIndex=30418;
endIndex=startIndex+n-1;
original=y(startIndex:endIndex+n+1);
windowed=original*hamming(length(original));
%signal=signal.*hamming(length(signal));
plotOpt=1;
[mag1, phase1, freq1,powerSpecInDb]=fftOneSide(original, fs); %error occur here
[mag2, phase2, freq2,powerSpecInDb]=fftOneSide(windowed, fs);
subplot(3,2,1); plot(original); grid on; axis([-inf inf -1 1]); title('Original signal');
subplot(3,2,2); plot(windowed); grid on; axis([-inf inf -1 1]); title('Windowed signal');
%subplot(3,2,3); plot(freq1, mag1); grid on; title('Energy spectrum (linear scale)');
%subplot(3,2,4); plot(freq2, mag2); grid on; title('Energy spectrum (linear scale)');
%subplot(3,2,5); plot(freq1, 20*log(mag1)); grid on; axis([-inf inf -80 120]); title('Energy spectrum (db)');
%subplot(3,2,6); plot(freq2, 20*log(mag2)); grid on; axis([-inf inf -80 120]); title('Energy spectrum (db)');
0 个评论
采纳的回答
Walter Roberson
2017-1-29
https://github.com/torogmw/MusicSegmentation/blob/master/fftOneSide.m
4 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!