How can I plot two 2D figures simultaneously, with one orthogonal to the other? They both share the same t axis, but the x axis lies perpendicular to the z axis and t axis, and they all share the same zero point.
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
edward bachelder
le 9 Oct 2015
Commenté : edward bachelder
le 9 Oct 2015
t = 0:.1:20;
x = 2*(18./(.5*t+.5).^.5 - 5.5);
z = 18./(.5*t+.5).^.5 - 5.5;
figure(1)
plot(t,x,':')
xlabel('Time')
ylabel('Distance')
set(gcf,'color','w')
figure(2)
plot(t,z,':')
xlabel('Time')
ylabel('Sink Rate')
set(gcf,'color','w')
axis([-inf inf -20 20])
0 commentaires
Réponse acceptée
Kelly Kearney
le 9 Oct 2015
Do you mean you want a 3D axis?
t = 0:.1:20;
x = 2*(18./(.5*t+.5).^.5 - 5.5);
z = 18./(.5*t+.5).^.5 - 5.5;
figure;
plot3(t, x, zeros(size(t)));
hold on
plot3(t, zeros(size(t)), z);
xlabel('Time');
ylabel('Distance');
zlabel('Sink Rate');
grid on;
set(gca, 'ydir', 'reverse');
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Line Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!