Surface area
Syntax:
[totalArea, areas, centroid] = surfarea(x,y,z)
[totalArea, areas, centroid] = surfarea(h), where h is a handle to a Surface object.
surfarea calculates the total surface area as well as returns the areas of each individual cell, along with the area centroid of the surface.
Example: Plot peaks, coloring each cell with its own area.
[x,y,z] = peaks;
[area,cellAreas,centroid] = surfarea(x,y,z);
h = surf(x,y,z,cellAreas); axis image
title(sprintf('Total surface area: %.2f', surfarea(h)));
Cite As
Sky Sartorius (2026). Surface area (https://uk.mathworks.com/matlabcentral/fileexchange/62992-surface-area), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: disperse
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
