Problems with truncated top of the graph

1 Ansicht (letzte 30 Tage)
Hakyoon Kim
Hakyoon Kim am 27 Nov. 2022
Kommentiert: Hakyoon Kim am 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)

Akzeptierte Antwort

Carlos Guerrero García
Carlos Guerrero García am 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])

Weitere Antworten (0)

Kategorien

Mehr zu Discrete Data Plots finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by