Plot 2-d contour of 3D dataset

1 回表示 (過去 30 日間)
Ors
Ors 2022 年 8 月 15 日
回答済み: KSSV 2022 年 8 月 17 日
I have a dataset with the following collumns: x, y, z, V. Rows are points V(x,y,z).
I wish to plot contours in the XY plane with the V values.
I have done:
[X,Y] = meshgrid(x,y)
how do I lay V data across the meshgrid so I can plot contour(X,Y,V)?
  3 件のコメント
KSSV
KSSV 2022 年 8 月 16 日
Read about slice. Else attach your data.
Ors
Ors 2022 年 8 月 17 日
The data attached is structured as follows:
column1 : x - coordinates in meters
column2 : y - coordinates in meters
column3 : z - coordinates in meters
column4 : Intensity at x, y, z in arbitrary units
Thank you

サインインしてコメントする。

回答 (1 件)

KSSV
KSSV 2022 年 8 月 17 日
How about this?
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1099910/data_16082022.csv') ;
x = T.(1) ;
y = T.(2) ;
z = T.(3) ;
v = T.(4) ;
dt = delaunayTriangulation(x,y,z) ;
patch('faces',dt.ConnectivityList,'vertices',dt.Points,'facevertexcdata',v,'facecolor','interp','edgecolor','none') ;
view(3)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by