Symbolic transpose of a matrix with the dimension not defined
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
I am trying to work with symbolic variables in Matlab but I have a little problem. I want to work with general expressions without specify the dimensions of the matrix. For example if I define A as a symbolic variable and I use "transpose(A)" I want to receive "transpose(A)" and not this:
>> syms A
transpose(A)
ans =
A
>> A = sym('a',[3 3]);
transpose(A)
ans =
[ a1_1, a2_1, a3_1]
[ a1_2, a2_2, a3_2]
[ a1_3, a2_3, a3_3]
I have a huge expression that I want to simplify later with the command "simplify".
Thank you in advance, Álvaro
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 4 月 7 日
Perhaps define a symbolic function Tr(M) without giving a definition for it, and apply it as needed. When it comes time to substitute actual matrix dimensions for A, you can also substitute a transpose function for Tr which would trigger the transposes.
2 件のコメント
Walter Roberson
2016 年 4 月 8 日
horner cannot do much unless it finds something that looks like a monomial . It does not take much to throw off horner.
Often more useful than horner() is collect()
But I would need to see more of the structure of your expression to say more.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!