"Lorenzo " <
lcam...@usc.edu> wrote in message
news:lldv10$1oh$1...@newscl01ah.mathworks.com...
> Dear guys,
>
> I'm having problems using eigs with function handle. Basically when I use
> the function handle I get completely wrong results. I am trying to find
> the eigenvector related to the smallest eigenvalue, in modulus, of a large
> matrix. I know that this smallest eigenvalue is actually zero.
> I would like to use eigs with the function handle as I have a more
> efficient way of computing the matrix vector multiplication (and I don't
> need to store a huge matrix).
> Any idea where the error can come from?
Not without seeing some code, no.
My first suspicion is that your function doesn't return what it should. From
the documentation for EIGS:
http://www.mathworks.com/help/matlab/ref/eigs.html?searchHighlight=Afun
y = Afun(x) should return:
A*x, if sigma is not specified, or is a string other than 'sm'
A\x, if sigma is 0 or 'sm'
(A-sigma*I)\x, if sigma is a nonzero scalar (standard eigenvalue problem). I
is an identity matrix of the same size as A.
(A-sigma*B)\x, if sigma is a nonzero scalar (generalized eigenvalue problem)
If you're passing in 0 or 'sm' for sigma, your function should not return
A*x but the solution y to the system of equations A*y = x.
--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com