2011-11-07 208 views
4

我有下面的代碼適用於繪圖軌道氫能2PZ的XY切片:MATLAB - 三維輪廓圖(氫2p軌道)

%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 

我想繪製三維輪廓圖的軌道。我試過這個(而且它似乎沒有得到我想要的):

isosurface(psi_210_vals(:,:,:)); %3D contour 

我該如何得到這個工作?

回答

6

您只需指定底層網格和所需的級別。例如:

>> isosurface(-10:.1:10, -10:.1:10, -2:.1:2, psi_210_vals, 0.001); 
>> axis equal 

enter image description here