フィルターのクリア

Making a 3D Density plot given Density at each point (X,Y,Z)

73 ビュー (過去 30 日間)
Saad khalid
Saad khalid 2022 年 10 月 4 日
回答済み: Vinayak 2022 年 10 月 20 日
I have a 3D matrix where each element corresponds to the density at point (X,Y,Z), see attached. The coordinates and data are loaded by the below code. The first two axis of xyPhi correspond to xh and yh, and the third axis corresponds to z. I would like to do a 3D density plot using this data, it should look something like a puck. I essentially want the equivalent of ListDensityPlot3D in Mathematica. Here is what the plot looks like in mathematica
M=60;%number of radial spatial lattice points
N = 60; %number of z-axis lattice points
R = 15;
Z = 14;
dr=double(2*R/(2*M+1));
dz = 2*Z/N;
xh = dr*(-M:1:M);
yh = dr*(-M:1:M);
z = -Z*ones(N+1,1) + dz*(0:1:N).';
load('phi_cylind_film_xy','xyPhi')

回答 (1 件)

Vinayak
Vinayak 2022 年 10 月 20 日
MATLAB provides a variety of plots for visualization such as line plots, scatter charts, animated plots etc.
More on the different types of plots provided can be found here
To plot data with density, you can have your data converted to matrices and use the mesh and surface plots.
More on this can be found here, https://www.mathworks.com/help/matlab/surface-and-mesh-plots-1.html

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by