solve system of equations imposing two variables not to be equal
4 ビュー (過去 30 日間)
古いコメントを表示
syms l11 l12
syms l21 l22
syms l31 l32
syms l41 l42
syms v11 v12
syms v21 v22
eq1 = [l11; l12; 1] == C1 * [v11; v12; 1];
eq2 = [l21; l22; 1] == C1 * [v21; v22; 1];
eq3 = [l31; l32; 1] == C2 * [v11; v12; 1];
eq4 = [l41; l42; 1] == C2 * [v21; v22; 1];
res = solve([eq1, eq2, eq3, eq4], [l11, l12, l21, l22, l31, l32, l41, l42, v11, v12, v21, v22])
I am trying to solve the above system of equations, but the result always has v11 == v21 and v12 == v22. I would like to impose those values to be different. I tried to use assume() but the result turns out to be empty. Howeer, I know that a volution with v11 != v21 and v12 != v22 must exist. How can I find it?
0 件のコメント
採用された回答
Torsten
2022 年 12 月 29 日
Solution is
C1 = C2 = 1
v11 = l11, v12 = l12, v21 = l21, v22 = l22
v11 = l31, v12 = l32, v21 = l41, v22 = l42
So if
l11 = l31 -> v11 = l11
l12 = l31 -> v12 = l12
l21 = l41 -> v21 = l21
l22 = l42 -> v22 = l22
If one of the conditions
l11 = l31, l12 = l31, l21 = l41, l22 = l42
is not satisfied, the system has no solution.
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!