The technical computing software MATLAB stores, processes and analyses data contained in arrays and matrices. After manipulating the data to its final form, plotting the data makes it easier to visualise the data to identify trends and other patterns. Plotting multiple data sets together helps correlate the trends between the two. There are many ways of representing the data on a plot, including using individual markers to represent unique data points or connecting each data point with a line. Learn how to represent the data using individual markers in a MATLAB plot.
- Skill level:
- Moderately Easy
Other People Are Reading
Clear all active variables within the workspace by entering "Clear All" into the Command window.
Create two arrays of data as sample points to plot, with one array representing the x-data, the other the y-data. For example, input "x=1:1:10." This creates the array [1 2 3 4 5 6 7 8 9 10]. Input "y=2:2:20" to create y-data. This will generate the array [2 4 5 6 8 10 12 14 16 18 20].
Enter into the command window "plot(x, y, ".") to plot the points. The "." in the code places a "." at each coordinate of the x-y matrix. For instance, a point will be placed at (1,2) and (2,4).
Click on the "Show Plot Tools and Dock Figure" in the figure menu to change the marker type. Click on one individual marker and select an appropriate icon under the pull-down menu labelled "marker."
Tips and warnings
- Omitting the "." from the code in step 3 will connect all points by a continuous line.
- You can also change the thickness and colour of the marker in the "Show Plot Tools and Dock Figure" menu.
- 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