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

4 views (last 30 days)
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 Comments
Stephen23
Stephen23 on 19 Dec 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

Sign in to comment.

Answers (2)

Mathieu NOE
Mathieu NOE on 19 Dec 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 on 26 Dec 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

Categories

Find more on Vector Fields in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!