Borrar filtros
Borrar filtros

Display Aproximation Coefficients from a Wavelet Transform using 3 Scales

1 visualización (últimos 30 días)
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 comentario
José Santos Pérez Leal
José Santos Pérez Leal el 29 de Jun. de 2021
I already solve this problem. This is my solution, in case it helps someone:
[c,l]=wavedec(bandpass_data,3,'db2'); %Descomposición de la señal en 3 niveles
Lev=1;
ca1=appcoef(c,l,'db2',Lev); %Coeficientes de aproximación (Frecuencias bajas)
Lev2=2;
ca2=appcoef(c,l,'db2',Lev2); %Coeficientes de aproximación (Frecuencias bajas)
Lev3=3;
ca3=appcoef(c,l,'db2',Lev3); %Coeficientes de aproximación (Frecuencias bajas)
[cd1,cd2,cd3]=detcoef(c,l,[1,2,3]); %Coeficientes de detalle (Frecuencias altas)
subplot(7,1,1)
plot(bandpass_data)
title('Señal Original')
subplot(7,1,2)
plot(ca1)
title('Coeficientes de Aproximación - Nivel 1')
subplot(7,1,3)
plot(ca2)
title('Coeficientes de Aproximación - Nivel 2')
subplot(7,1,4)
plot(ca3)
title('Coeficientes de Aproximación - Nivel 3')
subplot(7,1,5)
plot(cd1)
title('Coeficientes de Detalle - Nivel 1')
subplot(7,1,6)
plot(cd2)
title('Coeficientes de Detalle - Nivel 2')
subplot(7,1,7)
plot(cd3)
title('Coeficientes de Detalle - Nivel 3')

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by