How to remove offset to the time axis or low frequency trend and asymmetry of a time series data?
9 views (last 30 days)
Show older comments
I have time series data set. I wish to de-trend the data to make the sine waves symmetric with respect to the time axis. I tried using the detrend command offered in matlab and high pass filtering to data. No of them give me acceptable result. How can I write code to realize this?
Thanks in advance.
Sam Zhu
1 Comment
Image Analyst
on 21 Sep 2014
Maybe you should attach the data. People are probably waiting for that before trying anything.
Answers (1)
Image Analyst
on 21 Sep 2014
Do you have the Image Processing Toolbox? If so, use
meanSignal = 0.5 * (imerode(signal, se) + imdilate(signal, se));
newSignal = signal - meanSignal;
Basically it takes the halfway point between the upper envelope and the lower envelope, and subtracts that from the original signal. Pick the se window so that it includes at least one full cycle.
0 Comments
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!