© Michael Paluszek, Stephanie Thomas  2017

Michael Paluszek and Stephanie Thomas, MATLAB Machine Learning, 10.1007/978-1-4842-2250-8_5

5. MATLAB Graphics

Michael Paluszek and Stephanie Thomas1

(1)New Jersey, USA

Plotting is used extensively in machine learning problems. MATLAB plots can be two or three dimensional. The same data can be represented using many different types of plots.

5.1 Two-Dimensional Line Plots

5.1.1 Problem

You want a single function to generate two-dimensional (2D) line graphs, avoiding a long list of code for the generation of each graphic.

5.1.2 Solution

Write a single function to take the data and parameter pairs to encapsulate the functionality of MATLAB’s 2D line-plotting functions. An example of a plot created with a single ...

Get MATLAB Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.