フィルターのクリア

Integration of numerical data

9 ビュー (過去 30 日間)
Himalay Desai
Himalay Desai 2020 年 1 月 20 日
コメント済み: Himalay Desai 2020 年 1 月 29 日
Good evening!
I have a set of data collected from a gyroscope collected against time with a timestamp of 0.1 seconds. It contains both, positive and negative values. In order to obtain the angle, we have to integrate the angular velocity (data collected from MEMS and FIber Optic gyro) against time such. in this experiment, I have turned the gyroscope from 0 degrees to 30, from 30 degrees to 60 and then from 60 degrees to 0 again. theoretically, the answer of this integration should be zero as we are returning to the point where we originally started. but, the answer I'm getting here is 57.3920 degrees. It is understood that the funtion ' trapz() ' only evaluates the positive data points, thereby resulting to figure close to 60 degrees rather than zero. What funtion should I use in order to integrate this numeric data. Given below is the code for the same:
T30 = (deg30.Time);
M30 = (deg30.Mems);
F30 = -(deg30.Fiber);
intM30 = trapz(M30);
intF30 = trapz(F30);
note: also notice that the negative sign in the F30 function is for transponding the negative data points to the same side of the axis.
all attempts, successful or not, are appreciated!

採用された回答

Sindar
Sindar 2020 年 1 月 20 日
It does not appear that trapz ignores negative data. Instead, I think you just need to give it your time data so that it can accurately integrate:
intM30 = trapz(M30,T30);
intF30 = trapz(F30,T30);
  1 件のコメント
Himalay Desai
Himalay Desai 2020 年 1 月 29 日
thank you so much for the answer. i tried this one and it worked.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by