MATLAB computations on variables?
Afficher commentaires plus anciens
Is it possible to conduct MATLAB operations on just a matrix of variables? For example, if I wanted to compute the inverse of matrix
A = [a b; c d]
without assigning any values to any of the 4 variables just to get a general form. Thanks in advance!
Réponses (1)
The symbolic toolbox is great for stuff like this.
syms a b c d
A = [a b;c d]
inv(A)
1 commentaire
Caution: the size of the matrix expands quite rapidly for larger matrices.
syms M [4 4]
inv(M)
Catégories
En savoir plus sur Common Operations dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

