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 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Stephen23
2022 年 12 月 19 日
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
回答 (2 件)
Mathieu NOE
2022 年 12 月 19 日
Simply this :
x=0;
y=0;
z=0;
u = 4767/1121;
v = 4767/1121;
w = 0;
quiver3(x,y,z,u,v,w);
0 件のコメント
Sai
2022 年 12 月 26 日
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Vector Fields についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!