跪求MATLAB高手帮忙看下,下面的程序中,u(10:11,1)=1是什么意思啊,最好把这个程序给注释一下,在线等呢
x=0:20;t=0:0.01:1;a2=10;r=a2*0.01;u=zeros(21,101);u(10:11,1)=1;forj=1:100u(2:20,j+1)=...
x=0:20; t=0:0.01:1; a2=10; r=a2*0.01;
u=zeros(21,101); u(10:11,1)=1;
for j=1:100
u(2:20,j+1)=(1-2*r)*u(2:20,j)+r*( u(1:19,j)+u(3:21,j));
plot(u(:j)); axis([0 21 0 1]);pause(0.1)
end
surf(u) 展开
u=zeros(21,101); u(10:11,1)=1;
for j=1:100
u(2:20,j+1)=(1-2*r)*u(2:20,j)+r*( u(1:19,j)+u(3:21,j));
plot(u(:j)); axis([0 21 0 1]);pause(0.1)
end
surf(u) 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询