필터 지우기
필터 지우기

Display Aproximation Coefficients from a Wavelet Transform using 3 Scales

조회 수: 1 (최근 30일)
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
José Santos Pérez Leal
José Santos Pérez Leal 2021년 6월 29일
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')

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by