フィルターのクリア

trapz between 2 points

10 ビュー (過去 30 日間)
Sam
Sam 2018 年 11 月 27 日
編集済み: madhan ravi 2018 年 11 月 27 日
Hello,
I want to calculate the integral under a curve between 2 specific points on the x-axis.
How can I do this?
Thanks.

採用された回答

madhan ravi
madhan ravi 2018 年 11 月 27 日
編集済み: madhan ravi 2018 年 11 月 27 日
Example:
>> x=1:10
x =
1 2 3 4 5 6 7 8 9 10
>> y=rand(1,10)
y =
Columns 1 through 7
0.8147 0.9058 0.1270 0.9134 0.6324 0.0975 0.2785
Columns 8 through 10
0.5469 0.9575 0.9649
>> trapz(x(4:6),y(4:6))
ans =
1.1378
>>

その他の回答 (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