|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
想绘制一个分段函数的三维图象,这个函数是关于y轴对称的
我不会画三维的,只好画了个2维的,其描述如下:
f=f2(-x) (-0.0025<x<=R0)
f=f1(-x) (-R0<x<-0.0013)
f=0 (-0.0013=<x<=0.0013)
f=f1(x) (0.0013<x<R0)
f=f2(x) (R0=<x=<0.0025)
(R0为一常数)
其三维图象就是把2维的绕y轴旋转所得
以下是我写的绘制2维图象的代码:
R0=0.00186725213937;
R1=0.0013;
R2=0.0025;
um=2.2075;
um1=(R2.^2-R0.^2)/2-R0.^2*log(R2/R0);
um2=R0.^2*log(R0/R1)-(R0.^2-R1.^2)/2;
um1;
um2;
r=0.0013:0.000001:R0;
u1=um*(R0.^2*log(r/R1)-(r.^2-R1.^2)/2)/(R1.^2+R2.^2-2*R0.^2)*4;
v=R0:0.000001:0.0025;
u2=um*((R2.^2-v.^2)/2-R0.^2*log(R2./v))/(R1.^2+R2.^2-2*R0.^2)*4;
s=-R0:0.000001:-0.0013;
u3=um*(R0.^2*log(-s/R1)-((-s).^2-R1.^2)/2)/(R1.^2+R2.^2-2*R0.^2)*4;
t=-0.0025:0.000001:-R0;
u4=um*((R2.^2-(-t).^2)/2-R0.^2*log(R2./(-t)))/(R1.^2+R2.^2-2*R0.^2)*4
plot(r,u1,'b',v,u2,'b',s,u3,'b',t,u4,'b');
哪位大侠能教教我怎么画这个函数的三维图形呗,谢谢了!
(谢谢sigma665昨天的回复,但我太笨了,没理解) |
-
该函数的2维图象
|