That is not a large matrix. I'd densify it and use eigvals(Hermitian, vl,
vu) on it, where vl and vu are the bounds on the eigenvalues. E.g.

julia> A = complex(randn(1681,1681), randn(1681, 1681));A = A + A';


julia> eigvals(Hermitian(A), 5.0, 10.0)

31-element Array{Float64,1}:

 5.26302

 5.42228

 5.55435

 5.65633

 5.84422

 6.11133

 6.21744

 6.36111

 6.48903

 6.62528

 6.81823

 7.04365

 7.14765

 7.2444

 7.4786

 7.56008

 7.64389

 7.79291

 7.92042

 8.02744

 8.162

 8.24856

 8.46333

 8.66488

 8.8826

 8.99316

 9.12829

 9.27575

 9.43096

 9.63731

 9.87693


It also works for the vectors.

2015-01-26 11:54 GMT-05:00 Andrei Berceanu <andreiberce...@gmail.com>:

> The matrix is 1681x1681 with 8240 non-zero entries (i.e. 0.29% non-zero).
> I'm not sure how this relates to your second comment though :)
>
> On Monday, January 26, 2015 at 5:48:37 PM UTC+1, Andreas Noack wrote:
>>
>> How large is the matrix and what is the sparsity?
>>
>> You might be able to get closer to what you want by using shifts in eigs.
>> Then you'll get the values closest to the value of the shift.
>>
>> 2015-01-26 11:41 GMT-05:00 Andrei Berceanu <andreib...@gmail.com>:
>>
>>> Indeed it seems to work with complex matrices as well. What would be
>>> very useful for me is the ability to get eigenvalues within a certain
>>> interval, emin to emax. I dont see this in the capabilities of eigs.
>>>
>>> //A
>>>
>>> On Monday, January 26, 2015 at 4:21:58 PM UTC+1, Andreas Noack wrote:
>>>>
>>>> Yes. There is some extra output including convergence information and
>>>> the Ritz vectors. It should probably be explained in the manual, but the
>>>> first argument is the values. You can avoid the vectors with ritzvec=false,
>>>> so something like
>>>>
>>>> eigs(A, ritzvec = false)[1]
>>>>
>>>> should give you the largest (in magnitude) values.
>>>>
>>>> I think the documentation is simply wrong when stating that the matrix
>>>> has to be real. I just tried a complex matrix and it worked just fine, so
>>>> please open an issue about the documentation.
>>>>
>>>> 2015-01-26 10:03 GMT-05:00 Andrei Berceanu <andreib...@gmail.com>:
>>>>
>>>>> Besides, the help of eigs says "using Lanczos or Arnoldi iterations
>>>>> for real symmetric or general nonsymmetric matrices respectively". Mine is
>>>>> hermitian, i.e. complex and symmetric.
>>>>>
>>>>>
>>>>> On Monday, January 26, 2015 at 4:02:16 PM UTC+1, Andrei Berceanu wrote:
>>>>>>
>>>>>> That seems to return a lot of things besides the eigenvalues.
>>>>>>
>>>>>> On Monday, January 26, 2015 at 3:43:01 PM UTC+1, Andreas Noack wrote:
>>>>>>>
>>>>>>> You can use eigs. Usually, you only ask for a few of the values, but
>>>>>>> in theory, you could get all of them, but it could take some time to
>>>>>>> compute them.
>>>>>>>
>>>>>>> 2015-01-26 9:40 GMT-05:00 Andrei Berceanu <andreib...@gmail.com>:
>>>>>>>
>>>>>>>> Is there any Julia function for computing the eigenvalues of a
>>>>>>>> large, sparse, hermitian matrix M? I have tried eig(M) and eigvals(M) 
>>>>>>>> and
>>>>>>>> got the "no method" error.
>>>>>>>>
>>>>>>>> //A
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>
>>

Reply via email to