MATLAB - 3D轮廓图(氢2p轨道)

nic*_*ame 4 3d matlab plot contour

我有以下代码用于绘制氢气2pz轨道的xy切片:

%probability densities
pd_psi_210 = @(r,theta,phi) exp(-r).*(r.^2).*(cos(theta).^2)/(32*pi);

%configuring the range
[x y z] = meshgrid(-10:.1:10,-10:.1:10,-2:.1:2);
[THETA,PHI,R] = cart2sph(x,y,z);

%create array of probability density magnitudes
psi_210_vals = pd_psi_210(R,THETA,PHI);

%plotting
imagesc(psi_210_vals(:,:,1)); %x-y plane
Run Code Online (Sandbox Code Playgroud)

我想绘制轨道的三维等高线图.我试过这个(它似乎没有得到我想要的东西):

isosurface(psi_210_vals(:,:,:)); %3D contour
Run Code Online (Sandbox Code Playgroud)

我怎样才能让它发挥作用?

Joh*_*lby 6

您只需指定基础网格和所需级别.例如:

>> isosurface(-10:.1:10, -10:.1:10, -2:.1:2, psi_210_vals, 0.001);
>> axis equal
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述