How to remove Drift in the periodic signal after numerical Integration

3 ビュー (過去 30 日間)
aqib javed
aqib javed 2020 年 11 月 20 日
編集済み: Bjorn Gustavsson 2020 年 11 月 20 日
Hello to all mathworks fellows,
I am trying to numerically integrate a data using cumtrapz function. (the data file attached)
I have the attached graphs of input, integrated output and fft of the input as well. One can clearly observe the drift in the integrated output. How to troubleshoot it?
Can anyone help me in this regard please?
Thanks in anticipation.

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2020 年 11 月 20 日
編集済み: Bjorn Gustavsson 2020 年 11 月 20 日
The function detrend was made for this type of task. It should work like this:
y_detrended = detrend(y);
If you have a higher-order polynomial trend it copes too:
y_cubic_dt = detrend(y,3);
HTH

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by