The following table shows the file formats that you can import and export from the MATLAB® application.
In addition to the functions in the table, you also can use the Import Tool to import text or spreadsheet file formats interactively.
File Content | Extension | Description | Import Function | Export Function |
---|---|---|---|---|
MATLAB formatted data | MAT | Saved MATLAB workspace | ||
Partial access of variables in MATLAB workspace | matfile | matfile | ||
Text | any, including: | Comma delimited numbers | readmatrix | |
Delimited numbers | ||||
Delimited numbers, or a mix of text and numbers | none | |||
Column-oriented delimited numbers or a mix of text and numbers | ||||
Spreadsheet | XLS XLSB (Systems with Microsoft® Excel® for Windows® only) XLTM (import
only) ODS (Systems with Microsoft Excel for Windows only) | Column-oriented data in worksheet or range of spreadsheet | ||
Extensible Markup Language | XML | XML-formatted text | ||
Data Acquisition Toolbox™ file | DAQ | Data Acquisition Toolbox | none | |
Scientific data | CDF | Common Data Format | See | |
FITS | Flexible Image Transport System | See FITS Files | See FITS Files | |
HDF | Hierarchical Data Format, version 4, or HDF-EOS v. 2 | See HDF4 Files | See HDF4 Files | |
H5 | HDF or HDF-EOS, version 5 | See HDF5 Files | See HDF5 Files | |
NC | Network Common Data Form (netCDF) | See NetCDF Files | See NetCDF Files | |
Image | BMP | Windows Bitmap | ||
GIF | Graphics Interchange Format | |||
HDF | Hierarchical Data Format | |||
JPEG | Joint Photographic Experts Group | |||
JP2 | JPEG 2000 | |||
PBM | Portable Bitmap | |||
PCX | Paintbrush | |||
PGM | Portable Graymap | |||
PNG | Portable Network Graphics | |||
PNM | Portable Any Map | |||
PPM | Portable Pixmap | |||
RAS | Sun™ Raster | |||
TIFF | Tagged Image File Format | |||
XWD | X Window Dump | |||
CUR | Windows Cursor resources | none | ||
ICO | Windows Icon resources | |||
Audio (all platforms) | AU | NeXT/Sun sound | ||
AIFF | Audio Interchange File Format | |||
AIFC | Audio Interchange File Format, with compression codecs | |||
FLAC | Free Lossless Audio Codec | |||
OGG | Ogg Vorbis | |||
WAV | Microsoft WAVE sound | |||
Audio (Windows) | M4A | MPEG-4 | audioread | audiowrite |
any | Formats supported by Microsoft Media Foundation | audioread | none | |
Audio (Mac) | M4A | MPEG-4 | audioread | audiowrite |
Audio (Linux®) | any | Formats supported by GStreamer | audioread | none |
Video (all platforms) | AVI | Audio Video Interleave | ||
MJ2 | Motion JPEG 2000 | |||
Video (Windows) | MPG | MPEG-1 | VideoReader | none |
ASF | Windows Media® | |||
any | Formats supported by Microsoft DirectShow® | |||
Video (Windows 7 or later) | MP4 | MPEG-4 | VideoReader | VideoWriter |
MOV | QuickTime | VideoReader | none | |
any | Formats supported by Microsoft Media Foundation | |||
Video (Mac) | MP4 | MPEG-4 | VideoReader | VideoWriter |
MPG | MPEG-1 | VideoReader | none | |
MOV | QuickTime | |||
any | Formats supported by QuickTime, including | |||
Video (Linux) | any | Formats supported by your installed GStreamer plug-ins,
including | VideoReader | none |
Triangulation | STL | Stereolithography | stlread | stlwrite |
You can use web services such as a RESTful or WSDL to read and write data in an internet media type format such as JSON, XML, image, or text. For more information, see: