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.
8 views (last 30 days)
Show older comments
edward bachelder
on 9 Oct 2015
Commented: edward bachelder
on 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 Comments
Accepted Answer
Kelly Kearney
on 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');
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!