Final answer:
In Matlab, to plot both x and y against time t on the same graph, use 'plot(t, x); hold on; plot(t, y)' which uses the 'hold on' command to keep both plots on the same figure.
Step-by-step explanation:
To plot both x and y on the vertical axis of the same graph in Matlab with time (t) as the independent variable on the horizontal axis, you would use the following command: plot(t, x); hold on; plot(t, y).
This sequence of commands first plots the variable x against time, then holds the current figure so that the next plot is done on the same graph, and finally plots the variable y against time. The 'hold on' command is crucial as it allows for both lines to be plotted on the same figure without clearing the previous line.