Volumetric slice plot : 'Slice' Function (error:Input grid is not a valid MESHGRID.)
Afficher commentaires plus anciens
I am having trouble producing 3d plot using 'slice' function.It is giving me a 'not a valid meshgrid error'.and also 'silce' function error.here is my code:
if true
% code
end
R= linspace(0.14,0.28,100);
THETA= linspace(0,360,100);
Phi= linspace(90,-90,100);
[r,theta,phi]= meshgrid(R,THETA,Phi);
[X,Y,Z] = sph2cart(theta,phi,r);
t=(abs(sqrt(X.^2 + Y.^2+ Z.^2)));
beta=atan2d((sqrt(Y.^2+ Z.^2)),X);
A=(t/0.06)-(cosd(beta)/2);
B=(t/0.06)+(cosd(beta)/2);
C=((t).^2);
D=times((t),0.06*cosd((beta)));
E=((C+D+(((0.06).^2)/4)).^-1.5);
F=((C-D+(((0.06).^2)/4)).^-1.5);
H=times(A,E);
I=times(B,F);
V=0.2*(H-I);
xslice=0;
yslice=0;
zslice=0;
slice(X,Y,Z,V,xslice,yslice,zslice);
Réponses (0)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!