필터 지우기
필터 지우기

How can I calculate a Integral.

조회 수: 1 (최근 30일)
Emanuel Bicho
Emanuel Bicho 2015년 6월 9일
답변: Titus Edelhofer 2015년 6월 9일
Hello , and thanks for reading my question.
The problem is, i have a vector Error = [] , 60 values between 0 and 1 . I have another array that represents time . Time = [1,2,3...60]
I need to calculate the integral between 0 and 60 off Error(Time) dr;
How can i do this ?

채택된 답변

Titus Edelhofer
Titus Edelhofer 2015년 6월 9일
Hi,
use the trapz function:
trapz(Time, Error)
Titus

추가 답변 (1개)

Torsten
Torsten 2015년 6월 9일
integral = error(1)/2 + sum(error(2:59)) + error(60)/2.
Best wishes
Torsten.

카테고리

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