필터 지우기
필터 지우기

Troubling using Envelope Function - Envelope Curves Overlap!

조회 수: 3 (최근 30일)
Chinwe Orie
Chinwe Orie 2018년 6월 22일
Hello,
I am trying to use the envelope function to connect peaks of my signal. In order for the waveform to be a smooth "hump" looking curve, I tried using a bandpass filter in order to filter out signals that would interference with the smoothness of the curve. After using the bandpass filter, I found that along the flat lines of the signals (where the signal had been filtered out), the upper and lower envelope peak curve overlapped! I tried zooming on the graph to see why this occurred but no luck. It seemed very bizarre to me. Is this just a glitch or is there something wrong with my code?
CODE:
f = xlsread('d2.csv');
%plotting the signal
t = f(:,1);
X1 = f(:,2);
%Some of the envelope code was not working properly because MATLAB read
%some lines of the excel file as infinite numbers. The envelope function
%does not take infinite numbers.
%Thus, the below code deletes the infinite numbers from the array. There
%are only 2 of them.
fin = isfinite(X1);
t = t(fin);
X1 = X1(fin);
X = bandpass(X1, [70 120], 25000);
X = bandpass(X, [102 119], 25000);
% Y = fft(X);
% y = hilbert(X);
figure;
[up, lo] = envelope(X, 25000, 'peak');
plot(t,up,'r');
hold on
plot(t,X, 'b');
plot(t,lo,'k');
hold off

답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by