MATLAB: Is polyarea command related to fill comand

areafillpolyareapolygonrelation

In the attachment you can find a plot of the data I want to analyze. I used the fill command to color the polygon, which works quite nicely. I want to find the area of colored filling. Does the polyarea command exactly calculate the specified area? Or are there better approximations?

Best Answer

Polyarea will calculate the area of the polygon from the vertices. Fill is probably doing a little bit more interpolation, but the areas should match each other closely.