Calculate area between y = 0 and the curve plotted by discontinuos data

3 ビュー (過去 30 日間)
ly
ly 2016 年 7 月 9 日
回答済み: KSSV 2016 年 7 月 9 日
Hi,
I have a curve like graph. I want to calculate the area between y = 0 and the curve ploted by discontinuous data.
Could you have any suggestions?

採用された回答

KSSV
KSSV 2016 年 7 月 9 日
As you have data (x,y) in your hand use trapz(x,y) (Trapezoidal numerical integration) to get the area. doc trapz..
Eg:
X = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.85];
rA = [-.0053, -.0052, -.0050, -.0045, -.0040, -.0033, -.0025, -.0018, -.00125, -.0010];
plot(X,-1./rA,'.-r')
% Area
Int = trapz(X,rA)

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