Using the quiver3 function I get multiple not correct vectors. I want to plot a 3D vector stating from x=0, y=0, z=0 to x=4756/1121, y=4767/1121, z=0

3 visualizaciones (últimos 30 días)
figure()
[x y z] = meshgrid([4756/1121 4767/1121 0]);
u = x; v= y; w= z;
quiver3(x, y, z, u, v, w, 'off');
axis equal
Using plot3 plots the correct vector but quiver 3 should be used instaid
x = [0 4767/1121];
y = [0 4767/1121];
z = [0 0];
figure()
plot3(x,y,z)
xlabel('x')
ylabel('y')
zlabel('z')
grid on
hold on
  2 comentarios
Stephen23
Stephen23 el 19 de Dic. de 2022
Original question by Stefanos retrieved from Google Cache:
Using the quiver3 function I get multiple not correct vectors. I want to plot a 3D vector stating from x=0, y=0, z=0 to x=4756/1121, y=4767/1121, z=0
figure()
[x y z] = meshgrid([4756/1121 4767/1121 0]);
u = x; v= y; w= z;
quiver3(x, y, z, u, v, w, 'off');
axis equal
Using plot3 plots the correct vector but quiver 3 should be used instaid
x = [0 4767/1121];
y = [0 4767/1121];
z = [0 0];
figure()
plot3(x,y,z)
xlabel('x')
ylabel('y')
zlabel('z')
grid on
hold on

Iniciar sesión para comentar.

Respuestas (2)

Mathieu NOE
Mathieu NOE el 19 de Dic. de 2022
Simply this :
x=0;
y=0;
z=0;
u = 4767/1121;
v = 4767/1121;
w = 0;
quiver3(x,y,z,u,v,w);

Sai
Sai el 26 de Dic. de 2022
I understand that you are trying to get only one vector on 3-D plane using quiver3 function with the data provided. I hope the following code snippet helps you resolve your query.
quiver3(0,0,0,4767/1121,4767/1121,0); %quiver3(x,y,z,u,v,w);
Refer to the below documentation for more information on quiver3 function

Categorías

Más información sobre Vector Fields en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by