function [ ts ] = truesol(t,x) % % Written by: % -- % John L. Weatherwax 2005-06-15 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- anu = 3.0d-3; a = -(x-0.5d0+4.95d0*t)/ (20.0d0*anu); b = -(x-0.5d0+0.75d0*t)/ (4.0d0*anu); c = -(x-0.375d0)/ (2.0d0*anu); a = exp(a); b = exp(b); c = exp(c); tmp = a + b + c; ts = ( .1d0*a + .5d0*b +c ) ./ ( a + b + c );