| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Signal Processing Toolbox |
| Contents | Index |
| Learn more about Signal Processing Toolbox |
| On this page… |
|---|
Importing Data from Within the MATLAB Environment Importing Data from Outside the MATLAB Environment |
The examples in the preceding sections obtain data in one of two ways:
By direct input, that is, entering the data manually at the keyboard
By using a MATLAB or toolbox function, such as sin, cos, sawtooth, square, or sinc
Some applications, however, may need to import data from outside MATLAB. Depending on your data format, you can do this in the following ways:
Load data from an ASCII file or MAT-file with the MATLAB load command.
Read the data into MATLAB with a low-level file I/O function, such as fopen, fread, and fscanf.
Other resources are also useful, such as a high-level language program (in Fortran or C, for example) that converts your data into MAT-file format. See the Manually Converting Data Passed to Functions documentation for details. MATLAB reads such files using the load command.
Similar techniques are available for exporting data generated within MATLAB. See the Importing and Exporting Data documentation for more details.
All Signal Processing Toolbox functions accept double-precision inputs. If you input single-precision floating-point or integer data types, you should not expect to receive correct results and in many cases, an error will occur. Filter Design Toolbox and Fixed-Point Toolbox products enable single-precision floating-point and fixed-point support for most dfilt structures.
![]() | Waveform Generation: Time Vectors and Sinusoids | Selected Bibliography | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |