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 Ansichten (letzte 30 Tage)
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 Kommentare
Stephen23
Stephen23 am 19 Dez. 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

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Mathieu NOE
Mathieu NOE am 19 Dez. 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 am 26 Dez. 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

Kategorien

Mehr zu Vector Fields finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by