3D space and coordinate reference systems

Hi, I would like to plot a graph with reference system on it. I mean, a triad of three axes. How can I plot a vector? I should get a line, using three numbers (direction cosines).
Any ideas would be very much appreciated.
Thanks, Marco

Antworten (4)

Honglei Chen
Honglei Chen am 23 Mär. 2012

4 Stimmen

You can use quiver3, e.g.
quiver3(zeros(3,1),zeros(3,1),zeros(3,1),[1;0;0],[0;1;0],[0;0;1])
For details, see
doc quiver3
Ocram
Ocram am 23 Mär. 2012

0 Stimmen

Ok, this is fine for a reference system! But, if I want to plot an axis on the same plot that I get from quiver... How can I do? I mean an axis without the arrow at the end, just a simple line.
George Abrahams
George Abrahams am 14 Dez. 2023

0 Stimmen

Hi Ocram. You can use my plotframe function on File Exchange, with the name-value argument ShowArrowHead='off', as in:
plotframe( ShowArrowHead='off' )
axis equal

Kategorien

Mehr zu Vector Fields finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 23 Mär. 2012

Beantwortet:

am 14 Dez. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by