MATLAB computations on variables?

1 次查看(过去 30 天)
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!

回答(1 个)

Chris
Chris 2021-10-28
编辑:Chris 2021-10-28
The symbolic toolbox is great for stuff like this.
syms a b c d
A = [a b;c d]
A = 
inv(A)
ans = 
  1 个评论
Walter Roberson
Walter Roberson 2021-10-28
Caution: the size of the matrix expands quite rapidly for larger matrices.
syms M [4 4]
inv(M)
ans = 

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Formula Manipulation and Simplification 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by