Solving An Equation - Linear Algebra
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hazem El Sankari
am 21 Nov. 2018
Bearbeitet: Star Strider
am 22 Nov. 2018
Hello,
I would like to solve the following equation:
eqn = Ff == Kff*uf + Kfs*us; % I want to solve for uf knowing that
Kff =
3.0240 0.7680
0.7680 3.2427
Kfs =
0 0 -1.0240 -0.7680 -2.0000 0
0 -2.6667 -0.7680 -0.5760 0 0
Ff =
0
0
us =
0
-25
0
0
0
0
The problem is that I'm getting an error from MATLAB saying that uf is not defined, uf is supposed to be a 2x1 matrix but I want to solve for it. How can I do that?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 21 Nov. 2018
Bearbeitet: Star Strider
am 22 Nov. 2018
Straightforward:
KFF = Kff \ -(Kfs*us)
KFF =
5.5556
-21.8750
Another option is to use fsolve:
[UF, fval] = fsolve(@(uf) Kff*uf + Kfs*us, [1; 1])
UF =
5.5556
-21.8750
fval =
-7.1054e-015
-14.2109e-015
5 Kommentare
Star Strider
am 21 Nov. 2018
My pleasure.
If my Answer helped you solve your problem, please Accept it!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!