Symbolic Dot Product Of Symbolic 3D Vectors
47 views (last 30 days)
Show older comments
I have three 3d symbolic vectors, du, dv, dvv, which I initialize as
duu = sym('duu', [3,1])
...
I then calculate
N = cross(du,dv) / norm(cross(du,dv))
which gives me a resulting 3,1 vector as one would expect.
Now I want to do the symbolic dot product of (N, duu), however if I run
E = dot(N,duu)
the answer contains a load conj.
How to do I enforce that the result for E is a vector of real symbolic variables, not complex ones?
0 Comments
Answers (1)
Steven Lord
on 15 Mar 2017
Tell Symbolic Math Toolbox to assume that your symbolic objects are real either when you construct them:
duu2 = sym('duu2', [3,1], 'real')
dot(duu2, duu2)
or after they are constructed using assume or assumeAlso.
duu3 = sym('duu3', [3,1])
assume(duu3, 'real')
dot(duu3, duu3)
0 Comments
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!