O'Reilly logo

MATLAB for Machine Learning by Giuseppe Ciaburro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading mixed strings and numbers

There is more to life than numbers, although we cannot do without them. Very often we'll have to deal with files that can have numerical data as well as some text. In MATLAB, only some of the import functions actually work with strings and numbers. This is the case of the function readtable(). This function creates a table from a file. To understand how it works, we analyze the file containing the number of visitors to Italian museums in the last two years (Figure 2.7):

Figure 2.7: Number of visitors in Italian museums

The readtable() function creates a table by reading column-oriented data from a file. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required