Eigenvalue With a twist...

1 view (last 30 days)
Ryan Davidson
Ryan Davidson on 17 Feb 2019
Answered: Walter Roberson on 17 Feb 2019
I get errors when manipulating a set a matrices A and B for a eig() function so i need to check it this way.
I'm trying to execute this particular format for an eigenvalue problem:
syms x; %where A and B is symetric but B has intermittent zeros on the diagonal. %
I'm trying to get the roots of this line of math but it doesnt seem to work. My code:
keig=A\B;
syms x
I=(1/x).*eye(size(A));
beep=det(keig-I)
Not sure how to get the roots from here.
I tried roots(keig,x) but to no avail. I get: too many input args
Error using roots
Too many input arguments.
Error in CriticalBuckleAnalysis (line 8)
bwep=roots(blep,x);
Ideas?

Answers (1)

Walter Roberson
Walter Roberson on 17 Feb 2019
bwep = solve(beep, x)
This can be somewhat slow by 4 x 4 A, and by 5 x 5 it might just give you a bunch of roots() because of the inability to solve degree 5. However, you might be more interested in
factor(beep)
which gives four 1/x and a numerator and a denominator. The numerator term is linear in x (at least for the 4 x 4 test I did) leading to a single solution provided that the multiplier of x is not 0.

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!