0
votes

I have the following plot generated via FIT function:

[xrData, yrData, zrData] = prepareSurfaceData( Vr, Vi, Cr );      %this is my data used
ftr = 'lowess';
surffitr = fit( [xrData, yrData], zrData, ftr, 'Normalize', 'on' );
%Then I can plot the surface:
plot(surffitr,[xrData, yrData], zrData)
grid on
set(gca,'FontSize',16)
set(gcf,'color','w')
set(gcf,'units','normalized','outerposition',[0 0 1 1]) %maximize plot window to be saved
xlabel('Real Part of $\bar{V}^{+}_{f}, Re(\bar{V}^{+}_{f}) (V)$ ','Interpreter','latex')
ylabel('Imaginary Part of $\bar{V}^{+}_{f}, Im(\bar{V}^{+}_{f}) (V)$ ','Interpreter','latex')
zlabel('Real Part of $I^{+}_{vd} (A)$','Interpreter','latex')

Which Generates the following:Surface Generated

The point is, I wanted to alter my surface grid, for instance removing it, or using a different pattern (increasing the space between each cell).

I'm not using surf() function directly so I'm a bit confused about how to do it. Could someone please help me?

Thank you!

1

1 Answers

0
votes

Once you have your fit for the surface, you can apply it to whatever grid you want.

So, for example, if you want to increase/decrease your grid size, generate a new grid

[xNew, yNew] = meshgrid(minX:gridSizeX:maxX, minY:gridSizeY:maxY);

where you decide your minimum, maximum and grid size values for your x and y variables, and then apply the fit to them

zNew = surffitr(xNew, ynew);

After, you can plot it in whichever way you want (using surf, contour, ...).