Plot Vector using Plot3
Mostra commenti meno recenti
Hi guys,
I've calculated a vector using the cross product of 2 vectors and am curious how I can input this so that I can draw a plot.
How can I input it in a way that my i, j and k values will correspond to x, y and z values?
Thanks for any help
Risposte (2)
Tom
il 13 Mar 2012
Since vectors aren't really tied to points, you need to first specify a starting point for your vectors. If you want them to have common point, say (a,b,c). I would then construct x, y, z coordinate vectors like
x = i*t + a
y = j*t + b
z = k*t + c
where t is the parameter of the parametrized equations; it determines the length of your vectors. All that's left is plotting x, y and z.
1 Commento
Jacque
il 13 Mar 2012
Tom
il 14 Mar 2012
0 voti
I would set t=0:0.05:1;, for instance.
I was thinking of using the hold function when plotting. Without it I would think you would have to be smart about the order that you plot the points (the order of the arrays). But if it looks like it's working (and is correct), it probably is. The length of the cross product always tends to be larger than the initial vectors. I would just divide the entire resultant vector by a factor of 2 or 3, whatever looked better.
2 Commenti
Jacque
il 17 Mar 2012
Walter Roberson
il 17 Mar 2012
annotation() can be used to plot arrows.
http://www.mathworks.com/help/techdoc/creating_plots/f0-33318.html
Categorie
Scopri di più su 2-D Function Plots in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!