function z = f(x,t) global myf % return the values of f(x,t) if (myf) z = sin(2*pi*t).*sin(2*pi*x) + x.^2*t; else z = zeros(size(x)); end