MATLAB: How to know the volume behind a surface

Curve Fitting Toolboxsurface fitting integrationsurface integration

Hi! I imported some data x,y,z. z plotted against x and y creates a surface similar to a Gaussian one. I approximated my data with cftool. I obtained a surface in the space. Now I would like to know the volume behind the interpolant surface because it can approximate the spacial surface I am looking for.
Have you got any ideas? 'Cause I can only find in the guide cfit/integrate help but anything concerning sfit/integrate.
Many thanks…

Best Answer

If you have a matrix of data, I would use trapz to do the integration. You will have to use it two times — once in each dimension of the matrix — to get a scalar value for the volume.