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