System of linear equations
Afficher commentaires plus anciens
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 commentaires
KSSV
le 4 Déc 2020
FRame matrices with coefficients of unknown first....and then use \.
Shlomo Geva
le 4 Déc 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
le 4 Déc 2020
Shlomo Geva
le 4 Déc 2020
Look at the Symbolic Maths toolbox.
https://au.mathworks.com/help/symbolic/solve-a-system-of-algebraic-equations.html
Réponses (2)
Ameer Hamza
le 4 Déc 2020
0 votes
Star Strider
le 4 Déc 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.
Catégories
En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!