MATLAB: Plotting independent Z values at varying locations using contour

contour

I have been struggling with this for a few days now. I have the locations of my thermocouples in the system as x and y values with associated temperature value that are independent and change with time. I want to record the changes over time using a series of contour plots at different times. I have the x, y and temperature values (z-values). Can you please recommend how I can make my contour plots?

Best Answer

Let (x,y,z) be your values at one time step.
x = rand(10,1) ; % a randoms data
y = rand(10,1) ;
z = rand(10,1) ;
dt = delaunayTriangulation(x,y) ; % delaunay triangulation
points = dt.Points ; % points
tri = dt.ConnectivityList ; % nodal connectivity
xx = points(:,1) ;
yy = points(:,2) ;
%
F = scatteredInterpolant([x y],z);
zz = F(xx,yy) ;
trisurf(tri,xx,yy,zz) ; view(2) ; shading interp