function rhs=rhs(t,uv,dummy,D1,B,dx,n) u2=uv(1:n^2); v2=uv(n^2+1:2*n^2); urhs=(D1/dx^2)*B*u2+u2.*v2; vrhs=(D1/dx^2)*B*v2+u2.*v2; rhs=[urhs; vrhs];