O'Reilly logo

MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] by Manoj Kumar Sharma, Ashok Kumar Goel, Raj Kumar Bansal

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

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 ...

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