Clear Filters
Clear Filters

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

1 view (last 30 days)
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
maxina dialin
maxina dialin on 9 Oct 2012
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)

Wayne King
Wayne King on 8 Oct 2012
Edited: Wayne King on 8 Oct 2012
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
maxina dialin
maxina dialin on 9 Oct 2012
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.

Community Treasure Hunt

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

Start Hunting!