MATLAB Answers

0

Helping solving two variables in an equation

Asked by Nickolai Serebriakov on 5 Dec 2019 at 2:00
Latest activity Answered by Birdman
on 5 Dec 2019 at 6:11
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!

  0 Comments

Sign in to comment.

Products


Release

R2019a

1 Answer

Answer by Birdman
on 5 Dec 2019 at 6:11
 Accepted Answer

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 Comments

Sign in to comment.