Rotating a 2D plot around origo
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Anna
le 5 Avr 2016
Réponse apportée : Muhammad Usman Saleem
le 5 Avr 2016
Hello, I am trying to rotate the plot for a propeller blade about origo.
% code
endang=0:0.01:2*pi;
xp=rboss*cos(ang);
yp=rboss*sin(ang);
plot(0+xp,0+yp, 'b');
grid on
hold on
blade1 = plot(r, c./4, 'b', r, -c./4, 'b');
hold on
In this plot I wish to rotate blade1 three times, so the finished plot will look like a propeller. How do i rotate the blade?

0 commentaires
Réponse acceptée
Muhammad Usman Saleem
le 5 Avr 2016
rotate(h,direction,alpha)
rotates the graphics object h by alpha degrees. direction is a two- or three-element vector that describes the axis of rotation in conjunction with the origin of the axis of rotation. The default origin of the axis of rotation is the center of the plot box. This point is not necessarily the origin of the axes.
Positive alpha is defined as the righthand-rule angle about the direction vector as it extends from the origin of rotation.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Vector Fields 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!