[SciPy-user] Sparse matrix operations

Travis Oliphant oliphant at ee.byu.edu
Thu Nov 4 16:46:29 CST 2004


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




More information about the SciPy-user mailing list