Given the coordinates of each point, how to calculate the area of a three-dimensional surface in MATLAB?
x=-5:1:5;y=-5:1:5;
[xx,yy]=meshgrid(x,y);zz=Z;
figure(1)
mesh(xx,yy,zz)
figure(2)
xb=-5:0.25:5;
yb=-5:0.25:5;
[xxb,yyb]=meshgrid(xb,yb);
zzb=interp2(xx,yy,zz,xxb,yyb,'cubic');
mesh(xxb,yyb,zzb)
above is my code.
the picture is the data of z.
I tried to search for questions alike but I just couldn't find it.
CodePudding user response:
Try converting it to an AlphaShape then use SurfaceArea.