I've spent about... 6 hours developing the following. What you see is the correct answer to a problem I don't even understand.
Actually, I do understand it. It's just stupid.
Here's what it took:
eta=0:0.05:1 % (1 x 21)
tau=0:0.05:2 % (1 x 41)
a=0.25 % (1 x 1)
n=1:50 % (1 x 50)
t1=2/(a*pi*(1-a)); % (1 x 1)
[x1,t2]=meshgrid(eta,sin(n*pi*a)./n.^2); % (50 x 21)
t3=sin(n'*pi*eta); % (50 x 21)
t4=cos(n'*pi*tau); % (50 x 41)
u=(t1*t2.*t3)'*t4; % (21 x 41)
mesh(tau,eta,u)
Yeah, that's all. It's not much code. It's just a whole lot of vector multiplication and array representation of summations. EVIL!!