Integral of experimental data
2 次查看(过去 30 天)
显示 更早的评论
Hi, I'm tryng to solve an integral like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148631/image.png)
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?
回答(1 个)
Roger Stafford
2015-4-2
编辑:Roger Stafford
2015-4-2
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'.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!