Helping solving two variables in an equation

조회 수: 1 (최근 30일)
Nickolai Serebriakov
Nickolai Serebriakov 2019년 12월 5일
답변: Birdman 2019년 12월 5일
Hello everyone, I'm working on some homework but can't figure out how to solve two unkown variables at once.
I am trying to solve for v11 and v12
The code that I have so far is shown below.
Kt=[12 -1; -1 3]
I=[1 0;0 1]
lambda1=2.8902
w1=1.7001
%this is the part where I am struggling
%For lambda 1
eqn=((Kt-lambda1*I)*V1)==0
%Where V1=[v11;v12]
%Need to solve for for the real numbers of v11 and v12
%so I tried doing
syms v11 v12
soluv11=solve(eqn,v11)
%but this results in a variable still remaining, no clue how to solve
Would highly appreciate any help. Thank you!

채택된 답변

Birdman
Birdman 2019년 12월 5일
Try the following:
Kt=[12 -1; -1 3];
I=[1 0;0 1];
lambda1=2.8902;
w1=1.7001;
V1=sym('V1',[2 1]);
eqn=((Kt-lambda1*I)*V1)==0;
solx=solve(eqn,V1);
v11=solx.V11
v12=solx.V12

추가 답변 (0개)

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by