Problem using xcorr
显示 更早的评论
I am running the following code to find out the number of times a portion of the original signal is repeated in the audio.
[disco,f]=wavread('C:\Users\V\Downloads\gun.wav'); disco=disco(:,1); kisi=disco(100000:120000); s1=size(disco); a=0; s2=size(kisi); w=zeros(s2); for i=1:s1-s2+1; w=zeros(s2); w=disco(i:i+s2-1); c = xcorr(w,kisi,'biased'); if max(c)> 0.6 a=a+1; end end a
When I run it, it gets hung. It gives me the following error when I ctrl+C
??? Operation terminated by user during ==> xcorr>vectorXcorr at 153
In ==> xcorr at 54 [c,M,N] = vectorXcorr(x,autoFlag,varargin{:});
In ==> shit at 17 c = xcorr(w,kisi,'biased');
Can anyone help?
回答(1 个)
Image Analyst
2011-12-17
Well here's your problem:
In ==> shit at 17
You have shit in your program. That's never good.
2 个评论
Vishesh Vatsal
2011-12-17
Image Analyst
2011-12-17
Happens to me too. Frequently I have imshit(), but changing it to imhist() always gives me the histogram I was wanting.
类别
在 帮助中心 和 File Exchange 中查找有关 Correlation and Convolution 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!