Nils Wagner wrote: > Hi all, > > How can I compute the Rayleigh quotient > > R = x' A x/(x' B x), > > where A and B are sparse matrices. > > How do I compute the matrix vector product of a sparse matrix with a > vector ? > Can I use dot(A,x) ? No, This won't work. dot(x,A*x ) should work -Travis