How can I integrate a function?

2 次查看(过去 30 天)
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