Helping solving two variables in an equation

1 view (last 30 days)
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!

Accepted Answer

Birdman
Birdman on 5 Dec 2019
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

More Answers (0)

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!