%BASIC_CONTOUR % % Usage: % basic_contour(xPts, yPts, zPts) % % This function adds a plot of the triange-mesh used to interpolate grid % points for the provided data to the current figure, and draws data points % on top of the mesh. % Note that the title, axis labels, etc. must be handled outside of the % function. % % Input arguments: % xPts, yPts, zPts: Arrays of the x-, y-, and z-locations of the data % points. % % Author: Robert Wagner % Date: 2nd March 2009 % Last Modified: 12th March 2009 function triangle_mesh(xPts, yPts, zPts) hold on; tri = delaunay(xPts,yPts); trimesh(tri,xPts,yPts,zPts) % Draw the original points. plot3(xPts, yPts, zPts, 'k.') hold off;