Preserve the order of matrix when doing symbolic matrix multiplication
Mostra commenti meno recenti
Hi community,
I have been trying to use Matlab to do a large matrix multiplication using the symbolic tool. However, I found that the result it gave me is confusing in the order of matrices. Searched the mathwork forums and found a similar question without anwers:
So I decided to raise a new one and see if anyone knows the answer.
Problem I encounter is,
I define symbolic matrix as
A = sym('A', [1,1]);
B = sym('B',[1,1]);
and calculate
C = B*A,
and matlab will give me the answer C = A01*B01 which isn't the right order. The problem seems to root in the fact that matlab see the symbols as scalars when defined the dimension of [1,1], but I have to do this as my entire matrix is too big (38*38) so if I do dimension more than 1, it is very difficult to extract the matrix from the result.
Is there a way to force the order when doing multiplication? If not, could someone suggest other tools that can do this please?
Thanks in advance!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Matrix Indexing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!