Plotting vectors in Maple or MATLAB

In summary, the individual is seeking assistance with plotting vectors in either Maple or MATLAB for a parametric space curve. They have a specific number of points at which they want to plot the tangent, normal, and binormal unit vectors. They also have questions about how to plot a vector starting from a given point and how to plot all three unit vectors at the same point along with the original parametric curve. They have received a recommendation to use quiver3 in MATLAB and have found success with it so far.
  • #1
[TDH]AlphaQ
3
0
I need some help plotting vectors in either Maple or MATLAB. I have a parametric space curve and I am trying to plot the tangent, normal, and bi-normal unit vectors at several points along the curve.

I have roughly 10 or 11 points at which I want to plot the tangent, normal, and binormal vectors. The vectors are in numerical form such as t(1)=[1,2,3] (when the parametric coordinate=1, the tangent vector is [1,2,3], etc.)

1. How do I plot a vector starting from a given point, say plot the vector [1,2,3] starting at point [4,5,6]?
2. How do I plot all three unit vectors at the same point along with the three unit vectors for the other points on the same plot with the original parametric curve?

This doesn't seem like it should be difficult but I never learned how. Any help is quite appreciated!
 
Physics news on Phys.org
  • #2
AlphaQ try quiver3 in Matlab:

A three-dimensional quiver plot displays vectors with components (u,v,w) at the points (x,y,z).

quiver3(x,y,z,u,v,w) plots vectors with components (u,v,w) at the points (x,y,z). The matrices x,y,z,u,v,w must all be the same size and contain the corresponding position and vector components.
 
  • #3
Thank you! Tried it for two vectors and it worked great. I'll try putting it all together tomorrow, I think this will work.
 

1. How do I plot a single vector in Maple or MATLAB?

To plot a single vector in Maple, use the "arrow" command and specify the starting and ending points of the vector. In MATLAB, use the "quiver" command and specify the starting and ending coordinates of the vector.

2. Can I plot multiple vectors on the same graph in Maple or MATLAB?

Yes, in Maple, you can use the "arrows" command to plot multiple vectors at once. In MATLAB, you can use the "quiver" command and specify multiple sets of coordinates for each vector.

3. How do I change the color or style of the plotted vectors in Maple or MATLAB?

In Maple, you can use the "color" and "style" options within the "arrows" command to change the color and style of the vectors. In MATLAB, you can use the "Color" and "LineStyle" options within the "quiver" command.

4. Can I add labels and a legend to my vector plot in Maple or MATLAB?

Yes, in Maple, you can use the "textplot" command to add labels to specific vectors. To create a legend, use the "legend" command. In MATLAB, you can use the "text" command to add labels, and the "legend" command to create a legend for your vector plot.

5. How can I save my plotted vector graph as an image file in Maple or MATLAB?

In Maple, you can use the "exportplot" command to save your vector plot as an image file. In MATLAB, you can use the "saveas" command and specify the desired image file format to save your plot.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
504
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
697
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
904
Back
Top