MATLAB Answers

How to plotone single 3D vector in MATLAB

1 view (last 30 days)
Anu Saxena
Anu Saxena on 23 Aug 2018
Commented: Anu Saxena on 24 Aug 2018
How to plot one single vector in MATLAB


Geoff Hayes
Geoff Hayes on 23 Aug 2018
Anu - you may need to provide some context. Do you just have one vector? What are its dimensions? Have you looked at plot3?
Anu Saxena
Anu Saxena on 24 Aug 2018
Hi Geoff, thanks for the response. I have plotted a tangent plane to a surface. Using plot3 command highlighted the point on the surface. Now I want to be able to plot the normal vector at the point. Thanks.

Sign in to comment.

Accepted Answer

Pierre845 on 24 Aug 2018
A 3D vector has got 3 coordinates for Point 1, and 3 coordinates for Point 2. Point1(x1,y1,z1) Point2(x2,y2,z2)
Take X = [x1 x2]; Y = [y1 y2]; Z = [z1 z2]
Doing Plot3(X,Y,Z) will plot a 3D vector.

  1 Comment

Anu Saxena
Anu Saxena on 24 Aug 2018
Hi Thanks but the method gives an error.

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!

Translated by