How to get roots of determinant (characteristic) equation?

조회 수: 37 (최근 30일)
Amit Kumar
Amit Kumar 2014년 4월 30일
댓글: Walter Roberson 2021년 10월 4일
Hello all, I am solving an eigenvalue problem and giving symbolic matrix as input. I want to find roots of characteristic equation, I mean, roots of determinant of matrix equated to zero. Here I give script:
clear all;
close all;
clc;
syms w
A=[-2000*w^2+280*1e3,-280*1e3;280*1e3,-2000*w^2+280*1e3];
fun = matlabFunction(det(A))
I want to find roots of fun(). This is a polynomial equation of 4th order, so I should have 4 roots. If I use fzero, it just gives a local solution to problem, but I want to have all roots. Can you suggest something? Ofcourse, I can write coefficients of det(A) manually and pass it to roots([...]). But I don't want to write manually. I am even trying to bypass symbolics, as for large matrix, symbolic variables are computationally very expensive. Any comments? Thanks in advance!

채택된 답변

Star Strider
Star Strider 2014년 4월 30일
편집: Star Strider 2014년 4월 30일
Use the Symbolic Math Toolbox solve function:
DA = det(A)
W = solve(DA,w)
produces:
W =
(140 + 140*i)^(1/2)
(140 - 140*i)^(1/2)
-(140 + 140*i)^(1/2)
-(140 - 140*i)^(1/2)
  댓글 수: 4
Amit Kumar
Amit Kumar 2014년 4월 30일
Thanks a lot!!!
Star Strider
Star Strider 2014년 4월 30일
My pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Pratik Baraiya
Pratik Baraiya 2021년 10월 4일
clear all;
close all;
clc;
syms w
A=[-2000*w^2+280*1e3,-280*1e3;280*1e3,-2000*w^2+280*1e3];
fun = matlabFunction(det(A))
fun = function_handle with value:
@(w)w.^2.*-1.12e+9+w.^4.*4.0e+6+1.568e+11
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 10월 4일
What is your recommendation to proceed from fun to find the roots of fun ?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by