Assuming that we have two vectors force
and time
of the same length that contain the force and time values respectively, we can create a plot of the force vs time using the following code:
main.m76 chars5 lines
This will create a simple plot of the force vs time with time on the x-axis and force on the y-axis. The xlabel
and ylabel
functions add labels to the axes and the title
function adds a title to the plot. You can customize the plot by changing the labels, title, line style, color, thickness, etc.
gistlibby LogSnag