Symbolic matrix operations without breaking it down to the element level.
1 次查看(过去 30 天)
显示 更早的评论
Hi all, I want to check some derivations and gradients involving matrices and vectors and I would like to check it using the Symbolic Toolbox. But I do not want Matlab to break the matrix operations down on an element level since this blows up the equations and makes them almost impossible to read. For example I want the scalar product of a vector a with itself be displayed like this
a' * a
since there is nothing more to simplify. But if I use scalar symbolic variables I get
>> a = sym('a', 'real');
>> a' * a
ans =
a^2
which is not true if a is vector and if I use vectors of symbolic variables I get
>> a = sym('a', [3, 1], 'real');
>> a' * a
ans =
a1^2 + a2^2 + a3^2
which is hard to read in complex equations. I basically want Matlab to NOT break vectors and matrices down to their elements, just like a human would do, when deriving stuff on paper.
Is this possible? Thanks in advance.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!