After having used this tutorial to perform a surface plot for data in x,y, and z, MATLAB connects the ends of the data.
This can be seen by the flat, blue surface at the bottom of my plot. What can I do to stop it from connecting the ends?
My code is as follows:
%% Importing excel data
filename = 'ansysexport.xlsx';p = xlsread(filename,2);t = xlsread(filename,3);v = xlsread(filename,4);%% Velocity
vx=v(5:2495,1); vy=v(5:2495,2);vz=v(5:2495,3);[VX,VY] = meshgrid(vx,vy);VZ = griddata(vx,vy,vz,VX,VY,'cubic');set(gcf,'renderer','zbuffer')surf(VX,VY,VZ);xlabel('X');ylabel('Z');zlabel('Velocity (m/s)');set(gca,'FontSize',30)lighting phongcolorbar EastOutside
Best Answer