Effacer les filtres
Effacer les filtres

Integral of experimental data

2 vues (au cours des 30 derniers jours)
Antonio
Antonio le 2 Avr 2015
Hi, I'm tryng to solve an integral like this:
I have two data columns about variables P and V, both defined as function of an angle teta (-360<teta<360). How can I integrate this curve?

Réponses (1)

Roger Stafford
Roger Stafford le 2 Avr 2015
Modifié(e) : Roger Stafford le 2 Avr 2015
Using 'g' in place of 'gamma', do this:
Q = (g*trapz(V,P)+trapz(P,V))/(g-1);
or if you want the cumulative integral, replace each 'trapz' by 'cumtrapz'.
This assumes that P and V are vectors of the same length with corresponding elements given by the same value of 'theta'.

Catégories

En savoir plus sur Numerical Integration and Differentiation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by