How do you find the inverse of a matrix without the inv() command?

27 vues (au cours des 30 derniers jours)
Connor Lance
Connor Lance le 5 Mar 2022
Commenté : Paul le 6 Mar 2022
So I know the easiest way to find the inverse of a matrix is just simply using the inv() command but I wanted to know if there was a long form method. Specifically is there a way to code the rearranging of the values in a matrix?
from [a b;c d] ====> to [d -b;-c a]

Réponse acceptée

Matt J
Matt J le 5 Mar 2022
Modifié(e) : Matt J le 5 Mar 2022
There is this File Exchange contribution:
Example,
>> A=[1,2;3,4]
A =
1 2
3 4
>> adjugate(A).'
ans =
4.0000 -3.0000
-2.0000 1.0000
  2 commentaires
Connor Lance
Connor Lance le 5 Mar 2022
Exactly what I'm looking for, I appreciate it!
Paul
Paul le 6 Mar 2022
The Symbolic Math Toolbox has function that computes the adjugate. It works for doubles
A = [1 2;3 4];
adjoint(A)
ans = 2×2
4.0000 -2.0000 -3.0000 1.0000

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by