Solving linear systems in Matlab
古いコメントを表示
How do I solve for x in u = A(x+b)? A is a matrix, and the other terms are vectors. Isn't it something like x = A\u - b ? I'm not sure about subtracting the b term, however.
1 件のコメント
Bruno Luong
2023 年 8 月 24 日
編集済み: Bruno Luong
2023 年 8 月 24 日
In some sense x = A\u - b is the worse you can pick.
採用された回答
その他の回答 (1 件)
Steven Lord
2023 年 8 月 24 日
0 投票
Define a new variable y such that y = x+b.
Using this new variable simplifies your system to u = A*y.
Solve this simplified system for y using the backslash operator, y = A\u.
Substituing into that solution using the definition of y, we know x+b = A\u.
Subtract b from both sides to get x = (A\u)-b.
カテゴリ
ヘルプ センター および File Exchange で Problem-Based Optimization Setup についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!