Symbolic Dot Product Of Symbolic 3D Vectors
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Steven Lord
am 15 Mär. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Assumptions finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!