Display Aproximation Coefficients from a Wavelet Transform using 3 Scales
Show older comments
Hi, everyone.
I'm applying a Wavelet Transform to a signal using 3 Scales. My code is this one:
[c,l]=wavedec(bandpass_data,3,'db2'); %Descomposición de la señal en 3 niveles
approx=appcoef(c,l,'db2'); %Coeficientes de aproximación (Frecuencias bajas)
[cd1,cd2,cd3]=detcoef(c,l,[1,2,3]); %Coeficientes de detalle (Frecuencias altas)
subplot(5,1,1)
plot(bandpass_data)
title('Señal Original')
subplot(5,1,2)
plot(approx)
title('Coeficientes de Aproximación')
subplot(5,1,3)
plot(cd3)
title('Coeficientes de Detalle - Nivel 3')
subplot(5,1,4)
plot(cd2)
title('Coeficientes de Detalle - Nivel 2')
subplot(5,1,5)
plot(cd1)
title('Coeficientes de Detalle - Nivel 1')
And the signal bandpass_data is attached to this message.
My problem is: How can I display the approximation coefficients from scale 1 and 2 too in graphs, because I'm only displaying the approximation coefficient from scale 3?? I already do it with the detail coefficients, but I can't figure it out how to do the same thing with the approximation coefficients.
If someone could help me I would be very greatful.
1 Comment
José Santos Pérez Leal
on 29 Jun 2021
Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!