integration within specified limits

2 ビュー (過去 30 日間)
Sonia Goyal
Sonia Goyal 2021 年 2 月 16 日
コメント済み: Sonia Goyal 2021 年 2 月 18 日
I have the data file attached below. I have to take the square of column no. two of this data file and then have to integrate it from time '3' sec to time '6' sec. Please help me out with this.
Thanks in advance

採用された回答

Walter Roberson
Walter Roberson 2021 年 2 月 16 日
data = readmatrix('Data.xlsx');
mask = data(:,1) >= 3 & data(:,1) <= 6;
t = data(mask,1);
x2 = data(mask,2).^2;
trapz(t, x2)
  1 件のコメント
Sonia Goyal
Sonia Goyal 2021 年 2 月 18 日
Thanks a lot.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by