MATLAB Answers

0

Calculating eigenvalues of matrices of symbolic matrices

Asked by Luciano Rispoli on 18 Apr 2019
Latest activity Answered by Walter Roberson
on 18 Apr 2019
Dear all,
I have the following matrix of symbolix matrices:
[0 0 0;
0 -(D_2*N_1)^(-1)*D_2*N_2-(D_2*N_1)^(-1)*D_2*N(I-B_2*(D_1*B_2)^(-1)*D_1);
0 B_1-A_12*(I-N_1*(D_2*N_1)^(-1)*D_2)*N_2 (A_11-A_12*N + A_12*N_1*(D_2*N_1)^(-1)*D_2*N)*(I-B_2*(D_1*B_2)^(-1)*D_1)]
where * is the matrix product operator, ^(-1) is the matrix inverse operator and 0 is a matrix of zeros.
I want to know if there is a way of:
1) Using matlab to symplify the expression
2) Calculating the eigenvalues of this matrix
Any input is appreciated, many thanks!

  0 Comments

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 18 Apr 2019

The symbolic toolbox always considers a resolved symbolic variable to be a scalar, never as a stand-in for a matrix. You would have had to predefine your D and N variables as arrays of symbolic variables of a specific size and it would do the calculations with all of those individual variables. It would be unable to represent the answers in any kind of compact form. For example if the answer were D_1 * N_1 as a matrix the best it could do would be to give you the array that results from the multiplication.
It is also a stickler for array sizes. It is not possible to code something like
[0 A
-A 0]
Where A is a 2D array. It will never automatically expand the 0 to an appropriate size block of 0s.
The internal symbolic engine does not have any built-in capacity for treating a variable as a matrix, only as an array of fixed size with initialized content.

  0 Comments

Sign in to comment.