Effacer les filtres
Effacer les filtres

how can i draw a coordinate system of unit vectors?

36 vues (au cours des 30 derniers jours)
Christian von Spreckelsen
How can you draw a coordinatesystem of unitvectors like in the picture attached (don't mind the vector P)?

Réponses (2)

Star Strider
Star Strider le 9 Mar 2016
This works:
You may have to rotate it using the view function and do some other modifications to get it to look the way you want it. This just plots the vectors:
figure(1)
plot3( [0 0 0; 0 0 0; 0 0 1], [0 0 0; 0 1 0; 0 0 0], [1 0 0; 0 0 0; 0 0 0], 'p-r')
grid on
axis([-1 2 -1 2 -1 2])
% axis equal

George Abrahams
George Abrahams le 14 Déc 2023
Modifié(e) : George Abrahams le 14 Déc 2023
Hi Christian. For future reference, my plotframe function on File Exchange makes this easy. It's as simple as:
plotframe( rotationMatrix, translationVector )
axis equal, view( [37.5 30] )
Or if you want it formatted more similarly to the one in your figure, you can do that as follows:
plotframe( BasisColors='k', LabelBasis=true, ...
Labels=["$\hat{X}_{A}$","$\hat{Y}_{A}$","$\hat{Z}_{A}$"], ...
TextProperties={'Interpreter','Latex'} )
axis equal, view( [37.5 30] )

Catégories

En savoir plus sur Geographic Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by