MATLAB: Made a code in matlab which includes functions like rand, eig, cov and many more. I want to convert the same to HDL, but cannot due to those functions.

HDL Coderhdl convertermatlab function

hello, Can anyone tell me how to find out eigen values and eigen vectors of large matrix of order 10×10 or more, without using the function 'eig', so that it becomes convertible to HDL using HDL converter?

Best Answer

10x10 is not a large problem. :) In fact, 10 is pretty small. That does not mean it is trivial for any general matrix, and the simplest solution may depend on some characteristics of your matrix. Is it real and symmetric for example? Is it positive definite?
You can reduce an eigenvalue computation into one of finding the roots of a polynomial. Or you can use the power method on some matrices. (Be careful if an eigenvalue has degree greater than 1, etc.)
And tools like cov are easily written as not much more than subtracting a mean followed by a matrix multiplication.
Related Question