We present a computational method for solving a class of boundary-value problems in Sturm-Liouville form. The algorithms are based on global polynomial collocation methods and produce discrete representations of the eigenfunctions. Error control is performed by evaluating the eigenvalue problem residuals generated when the eigenfunctions are interpolated to a finer discretization grid; eigenfun...