m=0;
x=linspace(0,1,20);
t=linspace(0,2,10);
sol=pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
u=sol(:,:,1);                 %将解数组赋值给变量u
surf(x,t,u)
title('Numerical solution computed with 20 mesh points.')
xlabel('Distance x')
ylabel('Time t')
figure
plot(x,u(end,:))
title('Solution at t=2')
xlabel('Distance x')
ylabel('u(x,2)')
