Reputation: 1
In matlab, i'm trying to multiply symbolic matrices(size 3X3). The output shows matrix having some elements which are themselves matrices. why some of the elements are matrices?
Example code:
syms a1 a2 a3
F2 = [a1+0.0003 .0002 .0004; a2+.0003 .0005 .0003; a3+.0003 .0002 .0004];
C2 = F2'*F2;
K = C2^(16/57);
T = inv(K)*C2*inv(K);
S = T - 0.5*T^2 + 0.33*T^3;
Upvotes: 0
Views: 100
Reputation: 14316
The problem seems to be the K = C2^(16/57)
. Taking the root of a matrix is not trivial and solutions don't always exist. That's why MATLAB cannot resolve this expression. Try for example:
A = syms('A',[3,3]); % create 3x3 symbolic matrix
B = A^(1/3); % calculate the 3rd root of A
The result will be
ans = matrix([[a1_1, a1_2, a1_3], [a2_1, a2_2, a2_3], [a3_1, a3_2, a3_3]])^(1/3)
The same happens in your case. If you look closely, you will see that the matrix
expression in S(1,1)
is of the form matrix(...)^(32/57)
Upvotes: 0