Symbolic Dot Product Of Symbolic 3D Vectors
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Steven Lord
el 15 de Mzo. de 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 comentarios
Ver también
Categorías
Más información sobre Assumptions en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!