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

조회 수: 1 (최근 30일)
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.

채택된 답변

KSSV
KSSV 2018년 1월 22일
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
obaid-ur-rehman
obaid-ur-rehman 2018년 1월 23일
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?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by