Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Error computing eigenvalues using mata


From   "Glenn Goldsmith" <glenn.goldsmith@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Error computing eigenvalues using mata
Date   Mon, 13 Apr 2009 19:11:44 +0100

<>

I'm afraid I have no idea why this might be happening (and have been unable
to replicate the error myself). But you might be able to work around it by
using -symeigenvalues()- instead.

HTH,

Glenn.

P.S. 

Below is the code I have for -_eigenvalues()- (from -view _eigenvalues.mata,
adopath asis-). Tough to see where the error could be coming from here. Is
your version the same?

*! version 1.0.1  04jan2005
version 9.0

mata:

complex vector _eigenvalues(numeric matrix A, |cond, real scalar nobalance)
{
        complex vector evals

        if (args()==1) cond = .

        _eigen_work(0, A, .,  evals, cond, nobalance)
        
        return(evals)
}

end

Zachary Neal <stata_at_uic@yahoo.com> wrote:

I am trying to compute the eigenvalues for a 59 x 59 square, symmetric,
binary matrix.  The command <mata eigenvalues(x)> returns the following
error:

_eigenvalues():  3252  evals[59,1] found where complex required
eigenvalues():     -  function returned error
<istmt>:     -  function returned error

Any assistance would be appreciated.  I've pasted the problem matrix below,
but it is a bit hard to read.

Thank you
Zachary

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index