フィルターのクリア

Matlab code on How to fix the problem with this signal?

3 ビュー (過去 30 日間)
Mohammed Lamine Mekhalfia
Mohammed Lamine Mekhalfia 2022 年 11 月 4 日
回答済み: Star Strider 2022 年 11 月 4 日
Dear all.
I am trying to write a matlab code to help me do the following:
  • I have a signal obtained from a sensor, the signal represent the velocity of an object, well my goal was to obtain displasement (position signal) but the direct integration caused an error in the signal obtained (shown in Fig.01)
  • I would like to find a way how to make the signal straight without affecting the amplitude neither the frequency, I checked the values of Pk to Pk amplitude and it is correct.
  • I do not have the original velocity signal to make mat-operation on it, so I have with the position signal.
I appreciate your kind help
openfig('disppertime.fig');

採用された回答

Star Strider
Star Strider 2022 年 11 月 4 日
Use the detrend function —
F = openfig(websave('disppertime','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1181303/disppertime.fig'));
Ax = gca;
Kids = Ax.Children;
xv = Kids.XData;
yv = Kids.YData;
yvdt = detrend(yv, 1);
figure
plot(xv, yvdt)
grid
This will work for the main plot data.
.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by