%example-3,求解温度场
hold on
a=3;b=2;h=0.02;
x=0:h:a;
y=0:h:b;
[X,Y]=meshgrid(x,y);
Z=0.5*(1/sinh(2*pi*b/a)*sinh(2*pi*Y/a).*sin(2*pi*X/a)+...
    1/sinh(4*pi*b/a)*sinh(4*pi*Y/a).*sin(4*pi*X/a))+...
    1/sinh(3*pi*a/b)*sinh(3*pi*X/b).*sin(3*pi*Y/b);
surf(X,Y,Z)
title('解析法得到的温度场的三维图')
hold off