필터 지우기
필터 지우기

what command should i use to have real part of the eigenvalues of the matrix in symbolic form

조회 수: 2 (최근 30일)
clear all
m=sym('m')
n=sym('n')
A=[0 1 1/sqrt(3*n*m); 2 4 2/sqrt(3*n*m); 3 4 5/sqrt(3*n*m)]
eig(A)
I need to find the eigenvalues of this matrix but i just want a precise answer of variables 'n' and 'm' in real form, its not working, what should i do?

채택된 답변

Cyrus Tirband
Cyrus Tirband 2019년 10월 29일
Use the sym command when defining the matrix
m=sym('m')
n=sym('n')
A=sym([0 1 1/sqrt(3*n*m); 2 4 2/sqrt(3*n*m); 3 4 5/sqrt(3*n*m)])
eig(A)

추가 답변 (1개)

Arooj Ibrahim
Arooj Ibrahim 2019년 10월 29일
clear all
m=sym('m')
n=sym('n')
A=sym([0 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt(3*n*m) 1/sqrt(3*n*m); 1/sqrt(3*n*m) 0 1/3 0 1/3 0 0 0 0; 1/sqrt(3*n*m) 1/3 0 1/3 0 0 0 0; 1/sqrt(3*n*m) 0 1/3 0 1/3 0 0 0 0; 1/sqrt(3*n*m) 1/3 0 1/3 0 0 0 0 0; 1/sqrt(3*n*m) 0 0 0 0 0 1/3 0 1/3; 1/sqrt(3*n*m) 0 0 0 0 1/3 0 1/3 0; 1/sqrt(3*n*m) 0 0 0 0 0 1/3 0 1/3; 1/sqrt(3*n*m) 0 0 0 0 1/3 0 1/3 0] )
eig(A)
I need to find the eigenvalues of this matrix in symbolic form but the code is not working, help me out..

카테고리

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