Problem using xcorr
Afficher commentaires plus anciens
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?
Réponses (1)
Image Analyst
le 17 Déc 2011
Well here's your problem:
In ==> shit at 17
You have shit in your program. That's never good.
2 commentaires
Vishesh Vatsal
le 17 Déc 2011
Image Analyst
le 17 Déc 2011
Happens to me too. Frequently I have imshit(), but changing it to imhist() always gives me the histogram I was wanting.
Catégories
En savoir plus sur Correlation and Convolution dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!