Borrar filtros
Borrar filtros

How can I integrate a function?

2 visualizaciones (últimos 30 días)
Miguel Reina
Miguel Reina el 22 de Mzo. de 2017
Editada: Jan el 22 de Mzo. de 2017
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?

Respuesta aceptada

Jan
Jan el 22 de Mzo. de 2017
Editada: Jan el 22 de Mzo. de 2017
See cumtrapz :
x = 0:0.01:4*pi;
y = cos(x);
s = cumtrapz(x, y);
plot(x, y, 'r', x, s, 'b')

Más respuestas (0)

Categorías

Más información sobre Numerical Integration and Differentiation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by