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 Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by