Why does MATLAB dot product function interpret r as 2 different variables. I want to use trigonometric identities. How can I fix it?

11 views (last 30 days)
syms x y z u v r a
x=(a+r.*cos(u)).*cos(v);
y=(a+r.*cos(u)).*sin(v);
z=r.*sin(u);
X=[x y z]
X = 
Xu=diff(X,u)
Xu = 
Xv=diff(X,v)
Xv = 
E=dot(Xu,Xu)
E = 
simplify(E)
ans = 

Accepted Answer

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by