In this paper we describe a new pseudo-spectral method to solve numerically two and three-dimensional nonlinear diffusion equations over unbounded domains, taking Hermite functions, sinc functions, and rational Chebyshev polynomials as basis functions. The idea is to discretize the equations by means of differentiation matrices and to relate them to Sylvester-type equations by means of a fourth-order implicit-explicit scheme, being of particular interest the treatment of three-dimensional Sylvester equations that we make. The resulting method is easy to understand and express, and can be implemented in a transparent way by means of a few lines of code. We test numerically the three choices of basis functions, showing the convenience of this new approach, especially when rational Chebyshev polynomials are considered.