MATLAB: Surface under the curve

curve fittingMATLABsurface fitting

I have 3 vectors x,y,z such that function plot3 plots the attached graph. I need to fit a surface such that I get somewhat second attached graph.
I have tried surf function but I don't get the results I want. Kindly help

Best Answer

This looks something like what you want:
x = [0:10 10];
y = [0:10 10];
z= [0 6 5 8 7 7 8 9 7 5 6 0];
figure(1)
patch(x, y, z, 'g')
grid on
view([-30 30])
The key is using the patch function.
producing: