Problems with truncated top of the graph
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hakyoon Kim
il 27 Nov 2022
Commentato: Hakyoon Kim
il 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)
0 Commenti
Risposta accettata
Carlos Guerrero García
il 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])
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Discrete Data Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!