用matlab画 ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/pi*sin(n*pi*(R-r+th)/th)*exp(-(n*pi/th).^2*D*tci=1;cl=0.2;D=1.12x10.^(-9);R=0.001;th=0.0004;[r,t]=meshgrid(0.001:0.0001:0.0014,0:0.001:1);for n=1:100000ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/p
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/02 01:34:35
![用matlab画 ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/pi*sin(n*pi*(R-r+th)/th)*exp(-(n*pi/th).^2*D*tci=1;cl=0.2;D=1.12x10.^(-9);R=0.001;th=0.0004;[r,t]=meshgrid(0.001:0.0001:0.0014,0:0.001:1);for n=1:100000ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/p](/uploads/image/z/14971183-7-3.jpg?t=%E7%94%A8matlab%E7%94%BB+ca%3Dcl%2B%28ci-cl%29%2AR%2Fr%2A%28%28R-r%29%2Fth%2B1%2B%28-1%29.%5En%2A2%2Fn%2Fpi%2Asin%28n%2Api%2A%28R-r%2Bth%29%2Fth%29%2Aexp%28-%28n%2Api%2Fth%29.%5E2%2AD%2Atci%3D1%3Bcl%3D0.2%3BD%3D1.12x10.%5E%28-9%29%3BR%3D0.001%3Bth%3D0.0004%3B%5Br%2Ct%5D%3Dmeshgrid%280.001%3A0.0001%3A0.0014%2C0%3A0.001%3A1%29%3Bfor+n%3D1%3A100000ca%3Dcl%2B%28ci-cl%29%2AR%2Fr%2A%28%28R-r%29%2Fth%2B1%2B%28-1%29.%5En%2A2%2Fn%2Fp)
用matlab画 ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/pi*sin(n*pi*(R-r+th)/th)*exp(-(n*pi/th).^2*D*tci=1;cl=0.2;D=1.12x10.^(-9);R=0.001;th=0.0004;[r,t]=meshgrid(0.001:0.0001:0.0014,0:0.001:1);for n=1:100000ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/p
用matlab画 ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/pi*sin(n*pi*(R-r+th)/th)*exp(-(n*pi/th).^2*D*t
ci=1;
cl=0.2;
D=1.12x10.^(-9);
R=0.001;
th=0.0004;
[r,t]=meshgrid(0.001:0.0001:0.0014,0:0.001:1);
for n=1:100000
ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/pi*sin(n*pi*(R-r+th)/th)*exp(-(n*pi/th).^2*D*t));
end
mesh(ca);
这个程序不对
其实可以这样,只要求出比如当t=0.001,ca关于r的函数图就好,二维的;n是从1到无穷的求和,那个图片中有原函数
方程和希望得到的 图如下
用matlab画 ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/pi*sin(n*pi*(R-r+th)/th)*exp(-(n*pi/th).^2*D*tci=1;cl=0.2;D=1.12x10.^(-9);R=0.001;th=0.0004;[r,t]=meshgrid(0.001:0.0001:0.0014,0:0.001:1);for n=1:100000ca=cl+(ci-cl)*R/r*((R-r)/th+1+(-1).^n*2/n/p
感觉r和t有点问题.其一是r和t的步数.r的步数仅为5,而t的步数为1001,这样不合理.另外,r和t的范围可能存在点问题,不过这个我只是猜测,因为我画的时候发现,t>0.0012后就恒定了.不多说了.把代码和图发给你(我把r的步数改成了41,把t的步数改成了101):
ci=1;
cl=0.2;
D=1.12*10.^(-9);
R=0.001;
th=0.0004;
rrange=0.001:0.00001:0.0014;
trange=0:0.01:1;
[r,t]=meshgrid(rrange,trange);
temp1=zeros(size(t));
for n=1:200000
temp1=temp1+(-1)^n*2/n/pi*sin(n*pi*(R-r+th)/th).*exp(-(n*pi/th)^2*D*t);
end
ca=cl+(ci-cl)*R./r.*((R-r+th)/th+temp1);
surf(r,t,ca)