How to plot contour when the function has no relation with the coordinates.?

1 visualización (últimos 30 días)
I have 3 matrices. x(n,1), y(n,1) and z(n,1). I want to plot the contour of 'z' in the 'x-y' coordinate. Can anyone help? I can plot it in Origin easily but I need to plot in Matlab.

Respuesta aceptada

KSSV
KSSV el 22 de En. de 2018
N = 50 ;
x = rand(N,1) ;
y = rand(N,1) ;
z = rand(N,1) ;
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
coor = dt.Points ;
trisurf(tri,x,y,z,'EdgeColor','none');
view(2)
  1 comentario
obaid-ur-rehman
obaid-ur-rehman el 23 de En. de 2018
Thank u sir for the help. But sir how can I smooth the figure? The trace of triangles is still there. How can I get rid of these edges?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by