www.ypnh.net > MAtlAB作图二次曲面方程为x^2/A^2+y^2/B^2+z^2/C^2=D

MAtlAB作图二次曲面方程为x^2/A^2+y^2/B^2+z^2/C^2=D

^[x,y,z]=meshgrid(-25:25,-25:25,-25:25); for a=1:10;%a取1到10的整数pause(0.5)v=((x.^来2+y.^2+z.^2).^2-a.^2.*(x.^2+y.^2-z.^2));[d,m]=isosurface(x,y,z,v,0);patch('faces',d,'vertices',m,'facevertexcData',jet(length(m)),'facecolor','k','edgecolor','flat');view(

法一: >> sphere >> axis square 法二: 参数方程来画 clc clear % by friendchj r=1;%半径 x0=2;%中心 y0=2; z0=2; theta=(0:0.1:2)*pi; phi=(0:0.1:2)*pi; x=zeros(length(theta),length(phi)); y=x; z=x; for i=1:length(theta) for j=1:length(phi) x(i,j)=r*sin(

你好!代码如下:clc;clear allx=0:0.01:2;[x,y]=meshgrid(x,x);ezplot('(x^2+y^2)^3=4^2*(x^2-y^2)')axis([-2 2 -2 2])希望我的回答对你有所帮助

clc;clear;close all;a=2;b=1;x=-a:0.1:a;y=sqrt(b*(1-x.^2/a/a));plot(x,y)hold on;y=-sqrt(b*(1-x.^2/a/a));plot(x,y)

clear all close all [x,y]=meshgrid(-2:.1:2); z1=x.^2+2*y.^2 z2=6-2*x.^2-y.^2; mesh(x,y,z1); hold on mesh(x,y,z2); r0=(abs(z1-z2)<=0.2); zz=r0.*z1;yy=r0.*y;xx=r0.*x; plot3(xx(r0~=0),yy(r0~=0),zz(r0~=0),'ro') colormap(cool) hold off

ezplot('(x^2+y^2)^2-x^2+y^2')结果是一个环的图形

x=linspace(-10,10,100); y=linspace(-10,10,100); [x,y]=meshgrid(x,y); z=5*x.^2+y.^4; surf(x,y,z);

[x,y,z]=meshgrid(linspace(-1,1));isosurface(x,y,z,x.^2+y.^2+z.^4,1);axis equal

a=1x=-1:0.1:1;y=-1:0.1:1;[Y,X]=meshgrid(x,y);Z=arrayfun(@(x,y) fzero(@(z) x.^2+y.^2+(z-a).^2-a.^2,1),X,Y);surf(X,Y,Z)

matlab可以画符号参数函数,符号显函数,至于隐函数能不能画我不知道.这里你画一个曲面,可以用ezsurf().定义参数函数: syms r t .x=4rcost, z=6rsint, 则y=±5*sqrt(1+r*r),然后使用ezsurf(x,y,z,[rmin,rmax],[tmin,tmax]),分y±号两次画.这是我能想到最好的方法了

相关搜索:

网站地图

All rights reserved Powered by www.ypnh.net

copyright ©right 2010-2021。
www.ypnh.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com