0
votes

I have some data to plot in 2D contour mode with matlab and it seems to be a little tricky to plot. I have a 2D unstructured triangular mesh with x and y coordinates of centers of triangles and and lets say velocity and these centers of triangle;

x(:)=[x(1), x(2), ..., x(N)] 
y(:)=[y(1), y(2), ..., y(N)] 
u(:)=[u(1), u(2), ..., u(N)] 

The first picture below is the original meshgrid with the coordinates of vertices rather than the coordinates of centers of cells which what I want to useoriginal mesh using vertices coordinates

And with my try using Delaunay triangulation, I obtained this meshgrid meshgrid I obtained

clearly, It's very different and at the boundary is badly triangulated boundary problem and also boundary problem 2

1

1 Answers

0
votes

Use griddata to create a surface Use contour to create contours