MATLAB - 3D 等高线图(氢 2p 轨道)
我有以下代码,可用于绘制氢 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
我想绘制轨道的 3d 等高线图。我已经尝试过这个(它似乎没有得到我想要的):
isosurface(psi_210_vals(:,:,:)); %3D contour
我怎样才能让它工作?
I've got the following code which works for plotting an x-y slice of the Hydrogen 2pz orbital:
%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
I'd like to plot the 3d contour plot of the orbital. I've tried this (and it doesn't seem to get me what I wanted):
isosurface(psi_210_vals(:,:,:)); %3D contour
How can I get this to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需指定底层网格以及您想要的级别。例如:
You just have to specify the underlying grid, and the level you want. For example: