필터 지우기
필터 지우기

How can I integrate a function?

조회 수: 2 (최근 30일)
Miguel Reina
Miguel Reina 2017년 3월 22일
편집: Jan 2017년 3월 22일
For example if I have a vector with values that describe the cos(x) function, and as a result of integration i get the values of the sin(x) function. In my case my function is a flow signal (flow_proccessed) and i want to get the volume (vol). how can I do that?

채택된 답변

Jan
Jan 2017년 3월 22일
편집: Jan 2017년 3월 22일
See cumtrapz :
x = 0:0.01:4*pi;
y = cos(x);
s = cumtrapz(x, y);
plot(x, y, 'r', x, s, 'b')

추가 답변 (0개)

카테고리

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