Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

# Contour2Area 1.0

Date Added: June 28, 2013  |  Visits: 241

Gives the area of the polygons that are created from the matlab function C=contour(x,y,z,...); It also gives the centroids (centre of mass) of each polygon. The structure of C delivered by contour is a bit complicated to work with itself, why I developed this matlab function.Syntax: [Area,Centroid,IN]=Contour2Area(C)Takes the contour argument C from matlabs function contourcas produced by C=contour(x,y,z,...) and convert the contoursto closed polygons from where the areas are calculated.In addition the centroids (centre of mass) Cxy are calculatedand a matrix IN determining the parent/child relationshipbetween the contours (if polygon i is inside j then IN_ij=1, else=0).For obscure contours NaN would be retrived, but are excluded in output.%Created By: Per Sundqvist 2010-01-26, ABB/CRC, VdoTAsterdoDEs/Sweden.%%--- Example ---[X,Y,Z] = PEAKS(50);figure(1), clf;%C=contourf(X,Y,Z,0.37+[0 0]);C=contourf(X,Y,Z,5);[Area,Centroid,IN]=Contour2Area(C);xc=Centroid(1,:);yc=Centroid(2,:);hold on;plot(xc,yc,'k*');AreaIN

 Requirements: No special requirements Platforms: Matlab Keyword: Addition,  Determining,  Else3d0,  In Ij3d1,  Inside,  Matrix,  Obscure,  Retrived Users rating: 0/10

 License: Shareware Size: 10 KB
USER REVIEWS
 More Reviews or Write Review
CONTOUR2AREA RELATED