Using trapz function to find area of two vectors

조회 수: 3 (최근 30일)
Ajay Paudyal
Ajay Paudyal 2018년 2월 13일
답변: Star Strider 2018년 2월 13일
I have one vector named 'Power' having 300 values and 'time' vector with 300 values. I want to integrate them so as to get energy(Area under Power and Time). How to use trapz for this? If trapz cannot be used then please let me know any other method.

답변 (1개)

Star Strider
Star Strider 2018년 2월 13일
Try this:
Work = trapz(Time, Power)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by