How can i find the centroid of the wavelet coefficients from each frame of the audio signal?

Hi,i have to find the centroid of the wavelet coefficients for each frame of the audio signal.,i've applied wavedec to decompose the audio into 5 levels CA5,CD1,CD2,CD3,CD4,CD5 from that i have to find the energy and centroid of the wavelet coefficients.Is there anybody know about this?

4 Comments

I am confused: you talk about each frame of an audio signal, but you say you've applied wavedec to an image, which would be visual not audio.
sry.,i typed as wrongly., i've applied wavedec for an audio signal which was preprocessed as framed and overlapped.after decomposed the image i have to find the centroid and energy of each wavelet coefficients including approximation and detail.,how can i do that?>
that is not a image.,actually it is a audio signal.,sry i mentioned that is a image. i applied wavedec for an audio signal.,after that i have to calculate energy and centroid of the wavelet coefficients(approximation and detail)for all frames of the audio signal.,i dnt know how to do.,can u pls help me?

Sign in to comment.

Answers (1)

You can use wenergy() to find the energy in the output of wavedec()
load noisdopp;
[C,L] = wavedec(noisdopp,5,'sym4');
[Ea,Ed] = wenergy(C,L);
What do you mean by centroid? The mean? You can do that with detcoef() although the mean of the detail coefficients will be close to zero at each level I would suspect.
details = detcoef(C,L,'cells');
centroids = cellfun(@mean,details);

1 Comment

no.,actually i have to find one centroid value for all coefficients., if i use the function what you suggested above means i get 5 values.(since decomposition level is 5) but i want a single centroid value for coefficients including app. and detail coefficients.(ca5,cd1...cd5) how can i do that? the formula which i have to use is sum(i*(x(i)^2))/sum(x(i))^2 where x(i) is the ith wavelet coefficient.i=1,2..6(since we have 6 coefficients ca5,cd1...cd5) do u have any idea about this?

Sign in to comment.

Asked:

on 8 Oct 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!