![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/178834/image.png)
Plotting a set of unit vectors in 2-D
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
bio lim
el 22 de Oct. de 2015
Comentada: Star Strider
el 22 de Oct. de 2015
I am trying to figure out what is the best way to plot a set of unit vectors in 2-D anchored at (0,0). I am defining my rotational matrix (R) as follows.
R = [cosd(theta) -sind(theta); sind(theta) cos(theta)];
The angle of rotation is from 0 to 2pi such that it forms a unit circle. I also would rather use the regular plot command over plotv or quiver. Anyone has any suggestions?
Thanks.
0 comentarios
Respuesta aceptada
Star Strider
el 22 de Oct. de 2015
I’m not exactly certain what you want to do. I would do what you described with this:
a = linspace(0, 2*pi, 10);
r = 1;
x = r*cos(a);
y = r*sin(a);
o = zeros(size(a));
figure(1)
plot([o' x']', [o' y']')
axis equal
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/178834/image.png)
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!