How to plot vectors using quiver3
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
bym
am 5 Jul. 2011
you said you need to plot at t = pi, yet then you mention interval of -pi:.1:pi can you clarify?
Antworten (0)
Siehe auch
Kategorien
Mehr zu Assumptions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!