3d trajectory plot

35 ビュー (過去 30 日間)
Tyler Hajovsky
Tyler Hajovsky 2020 年 4 月 6 日
移動済み: Walter Roberson 2024 年 11 月 27 日
Im trying to create a 3d plot of 10 trajectories. I have the equation for the z axis and the x axis as an array. However i would like to start the plot at a point along the y axis instead of zero. I know how I want to go plotting the trajectories, it's getting the plot to start at a given point on the y axis. For example starting at the point (0 24 0) or (0 26 2).
  5 件のコメント
Tyler Hajovsky
Tyler Hajovsky 2020 年 4 月 6 日
This is the plot of the trajectory in 2d, given that the code for this plot is "plot(*x,z1)". I would like to make this plot 3d by adding in the y axis and starting the trajectory at a specific y coordinate.
Marcos
Marcos 2024 年 11 月 27 日
移動済み: Walter Roberson 2024 年 11 月 27 日
How to plot a initial point to final point in 3D graphics, using simultanious trajectory definite vs real time trajectory real PSO

サインインしてコメントする。

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 4 月 6 日
編集済み: Ameer Hamza 2020 年 4 月 6 日
Try this
v= 6.5;%ft/s
g= 32.2; %ft/s^2
theta= 30; %degrees
x= 0:.1:2;
y= randi(48)*ones(size(x));
z1= (x*tand(theta)-((g*x.^2)/(2*v^2*.75)));
plot3(x,y,z1)
grid on
xlabel('x');
ylabel('y');
zlabel('z');
  4 件のコメント
Tyler Hajovsky
Tyler Hajovsky 2020 年 4 月 6 日
Thank you so much!!
Ameer Hamza
Ameer Hamza 2020 年 4 月 6 日
Glad to be of help.

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by