Find the envelope of an oscillating data set
13 次查看(过去 30 天)
显示 更早的评论
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:
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.
0 个评论
回答(1 个)
Image Analyst
2020-1-28
Did you try the envelope() function?
2 个评论
Image Analyst
2020-1-28
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
2020-1-28
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!