Problems with truncated top of the graph

3 vues (au cours des 30 derniers jours)
Hakyoon Kim
Hakyoon Kim le 27 Nov 2022
Commenté : Hakyoon Kim le 27 Nov 2022
v0=250;
g=9.81;
theta=65;
x0=3000;
vx=-30;
v0z=v0*sin(theta*pi/180);
v0y=v0*cos(theta*pi/180);
t=2*v0z/g;
plot_for_t=linspace(0,t,100);
x=x0+vx*plot_for_t;
y=v0y*plot_for_t;
z=v0z*plot_for_t-0.5*g*plot_for_t.^2;
windblowwest(1:length(y))=x0;
plot3(x,y,z,'k-',windblowwest,y,z,'k--') %3차원 그래프 생성 %선은 점선으로
grid on
axis([0 6000 0 6000 0 2500])
xlabel('x(m)');
ylabel('y(m)');
zlabel('z(m)');
hello
i made a code to plot.
it works, but the top of the graph on the output is cut as shown.
i used the 'mesh' command just in case, but it comes out weird after printing the error code.
is there a command to set the upper limit of the graph size?
(i know there's a document, but I don't know what to search for)

Réponse acceptée

Carlos Guerrero García
Carlos Guerrero García le 27 Nov 2022
In the line
axis([0 6000 0 6000 0 2500])
delete the limits in the z-axis, i.e. use the following line instead:
axis([0 6000 0 6000])
  1 commentaire
Hakyoon Kim
Hakyoon Kim le 27 Nov 2022
it's simpler than I thought
thx!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by