Forums

eig function in DSP

Started by Laplace October 19, 2007
Hi!
I'm working with an algorithm that uses eig matlab's function. I'm now
writing this code in C. I read about eig() function and I think that
doing it by hand may be difficult... do you know any library that has
this function or a easy way to translate it from Matlab to C?

I'm working with ADSP 21369.

Thanks!

On 19 Okt, 12:41, Laplace <joselui...@gmail.com> wrote:
> Hi! > I'm working with an algorithm that uses eig matlab's function. I'm now > writing this code in C. I read about eig() function and I think that > doing it by hand may be difficult... do you know any library that has > this function or a easy way to translate it from Matlab to C?
There are no easy ways. On a regular computer (PC, MAC, **IX) you might be able to use the LAPACK library. But you use a DSP, where it is highly unlikely that the LAPACK library is availale. You may be lucky, though, so at least check. Just don't be surprised if the library isn't availale. Implementing a complete, general eigenvalue solver will be difficult, that's for sure. However, you might not need a general, complete eigenvalue solver. Most matrices encounterd in the realm of DSP are positive definite, which simplifies the algorithms significantly. If that's the case in your application, check out Golub and van Loan: Matrix Computations for algorithms. Rune
I would reexamine the algorithmic approach in view of what's needed to be 
done.  There may well be an approach that's not so compute/algo intensive.

Might this need be revealed?

Fred 


On 19 oct, 15:39, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 19 Okt, 12:41, Laplace <joselui...@gmail.com> wrote: > > > Hi! > > I'm working with an algorithm that uses eig matlab's function. I'm now > > writing this code in C. I read about eig() function and I think that > > doing it by hand may be difficult... do you know any library that has > > this function or a easy way to translate it from Matlab to C? > > There are no easy ways. On a regular computer (PC, MAC, **IX) > you might be able to use the LAPACK library. But you use a DSP, > where it is highly unlikely that the LAPACK library is availale. > You may be lucky, though, so at least check. Just don't be > surprised if the library isn't availale. > > Implementing a complete, general eigenvalue solver will > be difficult, that's for sure. However, you might not > need a general, complete eigenvalue solver. Most matrices > encounterd in the realm of DSP are positive definite, > which simplifies the algorithms significantly. > > If that's the case in your application, check out > > Golub and van Loan: Matrix Computations > > for algorithms. > > Rune
I'm going to do it by hand but, as you, said not a complete solver. Obtaining the eigenvalues it's easy but for eigenvectors I will expend more time. I'm going to see if I can find an example in C or other. Thanks!