I am triying to plot a surface response with some input points from a parametric study with the following code:
[xData,yData,zData] = prepareSurfaceData(x,y,z);ft = 'cubicinterp';[fitresult,gof] = fit([xData,yData], zData, ft, 'Normalize', 'on');[X,Y] = meshgrid(x(1):0.1:xData(end),y(1):0.1:y(end));Z = fitresult(X,Y);surf(X,Y,Z,'EdgeColor','texturemap');
The problem is that the surface fitted doesn't cover all original points x,y,z (red balls in figures), it stops in a given x () value. I am fitting ten different surfaces with the same x and y data points but different z and all have the same problem.
Best Answer