How do I apply operations to a symbolic array?
Show older comments
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 Comments
Karan Gill
on 30 Nov 2017
Adding to the answer, use assumptions, then isAlways: https://www.mathworks.com/help/symbolic/assumptions-for-symbolic-objects.html
ash ash
on 30 Nov 2017
Accepted Answer
More Answers (0)
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!