clear all
close all
clc
%本例题演示画三维图的不同方法
x=linspace(0,1,21);  
t=linspace(0,0.2,21);  
figure;surf(x,t,exp(-pi^2*t)'*sin(pi*x));
title('解析解'),xlabel('x'),ylabel('t' ),zlabel('u')

[X,T]=meshgrid(x,t);
Z=exp(-pi^2*T).*sin(pi*X);
figure;surf(X,T,Z)

figure;surf(X,T,Z-exp(-pi^2*t)'*sin(pi*x))
