フィルターのクリア

Inverse of a matrix

6 ビュー (過去 30 日間)
L'O.G.
L'O.G. 2023 年 5 月 16 日
編集済み: Matt J 2023 年 5 月 16 日
I want to solve the following for X2: A = B(X1+X2) where B is a matrix, and A, X1, and X2 are vectors. I can't divide by a matrix. So I believe I take the inverse. Is that right? What is the best way of doing this with very large matrices?
  1 件のコメント
Matt J
Matt J 2023 年 5 月 16 日
We would have to know what "very large" means to you.

サインインしてコメントする。

採用された回答

Matt J
Matt J 2023 年 5 月 16 日
編集済み: Matt J 2023 年 5 月 16 日
%Fake input data
B=rand(100); X1=rand(100,1); X2=rand(100,1);
A=B*(X1+X2);
%Now invert
X2_recovered=B\(A-B*X1);
norm(X2-X2_recovered) %Check discrepancy - should be small
ans = 4.4786e-13

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by