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!