5.4. Reading/Storing File Data

In MATLAB, there are many functions which are used to get the data from the files. These functions are categorized based on the types of format of the files. Some of the important functions are discussed in the following sections.

5.4.1. load Function

The load function is used to load variables/data in workspace from the disk file.

Programming Tip 5.5

load’ function is used only if data file contains numeric data.

The different syntax for load functions is

load
load('filename')
load('filename', 'x', 'y', 'z')
load filename x, y, z

where filename is the name of the file which is to be loaded and x, y, z are the variable names. If the file name has .mat extension, the file is treated as a MAT-file by the load ...

Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] 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.