Matlab is a programming language that allows users to enter, manipulate, plot and analyse data in a variety of ways. Matlab's built-in graphing utility, the "plot" function, can yield a graph of a set of points and also can draw lines between these points. Once you have plotted a set of points, invoke the plot function again with the specific data points you want to connect.
- Skill level:
- Moderately Easy
Other People Are Reading
Things you need
- Matlab R2006 or later version
Open Matlab. Plot the data that contain the points you want to connect. Use the "Plot" function.
Identify the x-coordinates of the two points you want to connect. Type "x = [x1, x2]" in the command window. For example, if you want to connect (1,5) and (3,6), type "x = [1,3]."
Identify the y-coordinates of the two points you want to connect, and type "y = [y1,y2]" in the command window. For example, if you want to connect (1,5) and (3,6), type "y = [5,6]."
Type "plot(x,y)" in the command window to connect the two points.
Tips and warnings
- To plot the whole set of data, type "plot(X,Y)" in the command window. "X" should be a set of x-coordinates. "Y" should be a set of y-coordinates.
- If you want to connect more points, repeat steps 3, 4, and 5 with new points.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for