% define a function rhs in a file rhs2D.m function rhs2D=rhs2D(tspan,u,dummy,k,dx,A) rhs2D=(k/dx^2)*A*u;