How can i calculate area under the cyclic curve and max ordinate of every curve?
2 views (last 30 days)
Show older comments
I have an excel scatter curve. in which the horizontal axis shows displacement and vertical one shows base shear.
how can I calculate maximum displacement in every cycle and area under the curve of every cycle
1 Comment
Answers (2)
darova
on 29 Jul 2019
Use this to find all start points of curves
ind = find(diff(x > 0));
ind = [1; ind];
Use trapz to calculate area under the curve
7 Comments
darova
on 5 Aug 2019
For simple curve like this you can use polyarea()
For curve that intersects itself i'd divide it into 2 parts (using max and min)
I used polyxpoly() to find intersections
polyxpoly() also returns indices of curves (where they intersect) so you can calculate area each of them apart using polyarea()
This kind of curve remains. Honestly i don't know where is an area here
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!