Problems with truncated top of the graph

1 次查看(过去 30 天)
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)

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Discrete Data Plots 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by