How do I apply operations to a symbolic array?
显示 更早的评论
Hi all,
I am preparing a program for symbolic Geometric Algebra computation and I am facing a problem that requires your help. My vectors will be represented in matrix form and there are many operations that need to be performed.
For example when matrix A is a double array:
A=[1 2 0; 4 0 6];
A>0
returns a logical matrix
[1 1 0;1 0 1]
However, when I set the following symbolic matrix:
syms C
a=sym(A);
a(1)=C;
a=[ C, 2, 0]
[ 4, 0, 6]
How do I apply an operation to this symbolic matrix to return the following logical matrix?
[1 1 0;1 0 1]
Thank you for your help.
2 个评论
Karan Gill
2017-11-30
Adding to the answer, use assumptions, then isAlways: https://www.mathworks.com/help/symbolic/assumptions-for-symbolic-objects.html
ash ash
2017-11-30
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!