How to plot vectors using quiver3

1 次查看(过去 30 天)
baba
baba 2011-7-5
here is my code i need to plot a,T,B,and N at t=pi on the interval -pi:0.1:pi but i cant get it to work can anybody help me please.
syms t
a=[0.5*cos(t), -sqrt(3)/2*cos(t), 1+sin(t)];
T=diff(a);
Answer1=T
N=diff(T);
Answer2=N
B=simplify(cross(T,N));
Answer3=B
C=cross(T/(sqrt(sum(T.^2)))^3,N/(sqrt(sum(T.^2)))^3);
Answer4=simplify(C)
syms t clear
t=-pi:0.1:pi;
a=[0.5*cos(t), -sqrt(3)/2*cos(t), 1+sin(t)];
T=diff(a);
N=diff(T);
plot3(0.5*cos(t), -sqrt(3)/2*cos(t), 1+sin(t))
hold on
plotT=quiver3(-0.5,0.866025403,0,-sin(pi)/2, (3^(1/2)*sin(pi))/2,
cos(pi))
plotN=quiver3(0,0,-1,-cos(pi)/2, (3^(1/2)*cos(pi))/2, -sin(pi))
plotB=quiver3(pi,pi,pi,-3^(1/2)/2, -1/2, 0)
hold off
  1 个评论
bym
bym 2011-7-5
you said you need to plot at t = pi, yet then you mention interval of -pi:.1:pi can you clarify?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by