System of linear equations
Ältere Kommentare anzeigen
Hello
I have this system of linear equations (5 eq & 5 unknowns), and i want to know how I can get U1/Ub (transfer function) using the matlab? Since doing it by hand is a tedious process. I appreciate if you can show me the code I must use.
4 Kommentare
KSSV
am 4 Dez. 2020
FRame matrices with coefficients of unknown first....and then use \.
Shlomo Geva
am 4 Dez. 2020
@KSSV, I suspect the question is seeking a symbolic answer rather than a numerical solution to a concrete case with known coefficients. The latter is trivial. The former is akin to what one might do with Mathematica.
MN
am 4 Dez. 2020
Shlomo Geva
am 4 Dez. 2020
Look at the Symbolic Maths toolbox.
https://au.mathworks.com/help/symbolic/solve-a-system-of-algebraic-equations.html
Antworten (2)
Ameer Hamza
am 4 Dez. 2020
0 Stimmen
Star Strider
am 4 Dez. 2020
‘I want to understand how to use matlab to re-arrange terms the equations and substitue them in each other so at the end i get Transfer functions of U1/Ub, U2/Ub, U3/Ub and U4/Ub.’
Considering the first equation:
syms ms cs uq us ks kq Us U1 Ub s
Eqn1 = Us*(ms*s^2 + cs*s + (uq+us)) == U1*(cs*s + ks) + kq*Ub; % Possibility #1
Eqn1 = Us*(ms*s^2 + cs*s + (kq+ks)) == U1*(cs*s + ks) + kq*Ub; % Possibility #2
Eqn1a = isolate(Eqn1, U1)
the result is:
U1 == -(Ub*kq - Us*(ms*s^2 + cs*s + kq + ks))/(ks + cs*s)
and since ‘Ub’ is not a factor of every term in the RHS (neither is ‘Us’), the result you want is not possible, at least for this equation.
You might be able to solve the system for ‘U1’ through ‘U4’ (I will let you type all of them in), and then derive the relevant transfer functions, however I am not optimistic.
I will let you do that experiment.
Kategorien
Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!