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)
0 个评论
采纳的回答
Carlos Guerrero García
2022-11-27
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 Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!