Find the envelope of an oscillating data set

7 views (last 30 days)
Hello,
I have some 2d data, from which I have extracted some 1d data. There are two versions of this 1d data, one raw, and the other obtained after 2d interpolation. They both show what I believe to be exponential decay in amplitude. But there are unexpected oscillations as well, which are preventing me from fitting the function directly. Can someone please help me to get the (exponential) envelope of the signal?
I have attached two 2d signals in .csv format.
Raw signal:
Interpolated signal:
NB: I tried using abs(hilbert(x)) and envelope(x), but did not get anything useful since they follow the signal too closely. For example, with the interpolated data:
data, hilbert, envelope
This may be because the signal cannot broken up easily into a product of an exponential and a sinusoidal. But all I want is an estimate of the width over which the amplitude is appreciable.
Thank you.

Answers (1)

Image Analyst
Image Analyst on 28 Jan 2020
Did you try the envelope() function?
  2 Comments
Image Analyst
Image Analyst on 28 Jan 2020
Anshuman's reply to me moved here since it's not an answer to the original question.
Yes, but it's like the Hilbert function; it follows the real graph too closely. I have edited my question to show the results.
Image Analyst
Image Analyst on 28 Jan 2020
Then maybe try findpeaks() to find the peaks and valleys and use interp1() to fill the space in between peaks and valleys with straight lines.
[peakValues, peakIndexes] = findpeaks(signal);
[valleyValues, valleyIndexes] = findpeaks(-signal);
etc.

Sign in to comment.

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!