matlab根据方程画椭球面
用MATLAB画出椭球面的图形的代码咋写,我只画出上半部分
x = @(th,phi) sin(th) .* cos(phi); y = @(th,phi) 2.0 * sin(th) .* sin(phi); z = @(th) sqrt(12) * cos(th); [ th2d, phi2d ] = meshgrid( 0.0:0.1:pi, 0.0:0.1:2.0*pi ); mesh( x(th2d,phi2d), y(th2d,phi2d), z(th2d) ); axis equal; % change the view of mesh view( -65, 62 ); % change the color of lines in black colormap( [ 0, 0 ,0 ] );
怎样用matlab画椭球?
ellipsoid函数,格式如下: [x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr,n)%(xc,yc,zc)为中心,xr,yr,zr为半轴长。 demo如下: [x, y, z] = ellipsoid(0,0,0,5.9,3.25,3.25,30); surfl(x, y, z) colormap copper axis equal
用ellipsoid函数,看一下帮助就明白了。 请采纳答案,支持我一下。
matlab 命令行中用doc 加elipsoid 看帮助
如何用matlab画出椭球面等高线 椭球方程用参数式表示 跪求程序
椭球面等高线,可以用contour(x,y,z)来画出。 参数式椭球方程 x=4*sin(beta).*cos(theta); y=9*sin(beta).*sin(theta); z=cos(beta); 运行后得到的图形