필터 지우기
필터 지우기

how to simplify a symbolic linear system of equations

조회 수: 10 (최근 30일)
Ítalo Almeida
Ítalo Almeida 2023년 7월 23일
답변: Walter Roberson 2023년 7월 23일
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.
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.

채택된 답변

Walter Roberson
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])
A = 
b = 
The variables that the system is linear in must be passed as the second parameter.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by