Contour plot using three vectors
古いコメントを表示
Hi. I want to make a contour plot using three vectors. The vectors "x" and "y" has the X and Y coordinates/positions. The vector "z" has numerical values of a property at corresponding (X,Y). All these vectors are of same size (1 X 50,000). I want to make a contour plot using three vectors. Can someone help me with it? I have tried contour and surf in vain and it didn't help.
採用された回答
その他の回答 (1 件)
KSSV
2019 年 11 月 12 日
It depends on how is your data. Is your data a structured data or a unstructured data? YOu have the following options. Let (x,y,z) be your three vectors.
%%structured
xi = unique(x) ; yi = unique(y) ;
[X,Y] = meshgrid(xi,yi) ;
Z = reshape(z,size(X)) ;
figure
surf(X,Y,Z)
%%unstructured
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
figure
trisurf(tri,x,y,z)
6 件のコメント
SS
2019 年 11 月 12 日
KSSV
2019 年 11 月 12 日
Use contour with the values..thats it....for unstructured contour, you may use this: https://in.mathworks.com/matlabcentral/fileexchange/38858-contour-plot-for-scattered-data?focused=5249779&tab=function
KSSV
2019 年 11 月 12 日
YOu may try this: https://in.mathworks.com/matlabcentral/fileexchange/40847-tricontf
KSSV
2019 年 11 月 12 日
Read the help in there with the function and try to input the inputs in the correct way.
カテゴリ
ヘルプ センター および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!