how to simplify a symbolic linear system of equations
3 ビュー (過去 30 日間)
古いコメントを表示
I have n symbolic expressions in terms of
, which are of the variable type 'sym' in matlab. They form a system of equations that is linear in
, but the symbolic expressions are NOT organized with only one term of each from
how a linear system normally is.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1440698/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1440703/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1440708/image.png)
How do I organize the system like a simplified linear system ususally looks, with only one term of each variable
in each equation? I already tried the 'Simplify Symbolic Expressions' page from MATLAB and it wasn't helpfull.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1440713/image.png)
0 件のコメント
採用された回答
Walter Roberson
2023 年 7 月 23 日
Example:
syms x y z tau
eqns = [x+y-2*z*tau == 0,
x+y*tau^2+z == 1,
2*y-z == -5];
[A,b] = equationsToMatrix(eqns, [x, y, z])
The variables that the system is linear in must be passed as the second parameter.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!