フィルターのクリア

Matrix inverse with numbers and letters

2 ビュー (過去 30 日間)
Roberto Antonino Ruggeri
Roberto Antonino Ruggeri 2016 年 3 月 5 日
編集済み: John D'Errico 2016 年 3 月 5 日
Hi Everyone, I need to have a matrix inverse of a matrix which is not only made of numbers. How can I have an inverse of my matrix leaving numbers and letters?

回答 (2 件)

Rosi
Rosi 2016 年 3 月 5 日
I´m not sure about what you want to do, but this could be one way for solving your problem.
syms a b c d
A = [a 1 2 b; 0 4 2 10; 5 1 2 c; 4 d 9 3];
A^-1

John D'Errico
John D'Errico 2016 年 3 月 5 日
編集済み: John D'Errico 2016 年 3 月 5 日
This gets asked over and over again. Nothing stops you from trying it. The symbolic toolbox can do it, within limits.
While the idea is fine for a 2x2 or 3x3, and perhaps you can go a bit further and gain a usable result. I seriously doubt that you might want to bother for a 10x10 matrix though.
syms a11 a12 a21 a22
A = [a11 a12;a21 a22];
inv(A)
ans =
[ a22/(a11*a22 - a12*a21), -a12/(a11*a22 - a12*a21)]
[ -a21/(a11*a22 - a12*a21), a11/(a11*a22 - a12*a21)]
So, trivial for a small matrix. Not so at all if your matrix is large.

Community Treasure Hunt

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

Start Hunting!

Translated by