MATLAB computations on variables?

1 visualización (últimos 30 días)
Hassan Taymuree
Hassan Taymuree el 28 de Oct. de 2021
Comentada: Walter Roberson el 28 de Oct. de 2021
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!

Respuestas (1)

Chris
Chris el 28 de Oct. de 2021
Editada: Chris el 28 de Oct. de 2021
The symbolic toolbox is great for stuff like this.
syms a b c d
A = [a b;c d]
A = 
inv(A)
ans = 
  1 comentario
Walter Roberson
Walter Roberson el 28 de Oct. de 2021
Caution: the size of the matrix expands quite rapidly for larger matrices.
syms M [4 4]
inv(M)
ans = 

Iniciar sesión para comentar.

Categorías

Más información sobre Formula Manipulation and Simplification en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by