Skip to Main Content Skip to Search
Product Documentation

Supported File Formats

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, the Import Wizard and the importdata function support all listed formats, except:

The Import Wizard supports HDF files, but importdata does not.

File Content

Extension

Description

Import Function

Export Function

MATLAB formatted data

MAT

Saved MATLAB workspace

load

save

Text

any

White-space delimited numbers

load

save -ascii

Delimited numbers

dlmread

dlmwrite

Delimited numbers, or a mix of strings and numbers

textscan

 

Spreadsheet

XLS
XLSX

Microsoft® Excel® worksheet

xlsread

xlswrite

XLSB
XLSM

Formats supported on Windows® systems with Excel 2007 or later

ODS

OpenDocument™ Spreadsheet, supported on Windows systems with Excel 2010 or later (OpenDocument is a trademark of OASIS™, the open standards consortium)

xlsread

none
Extensible Markup Language

XML

XML-formatted text

xmlread

xmlwrite

Data Acquisition Toolbox™ file

DAQ

Data Acquisition Toolbox

daqread

none

Scientific data

CDF

Common Data Format

See cdflib

See cdflib

FITS

Flexible Image Transport System

fitsread

none

HDF

Hierarchical Data Format, version 4, or HDF-EOS v. 2

See hdf

See hdf

H5

HDF or HDF-EOS, version 5

See hdf5

See hdf5

NC

Network Common Data Form (netCDF)

See netcdf

See netcdf

Image

BMP

Windows Bitmap

imread

imwrite

GIF

Graphics Interchange Format

HDF

Hierarchical Data Format

JPEG
JPG

Joint Photographic Experts Group

JP2
JPF
JPX
J2C
J2K

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
TIF

Tagged Image File Format

XWD

X Window Dump

CUR

Windows Cursor resources

imread

none

FITS

FTS

Flexible Image Transport System

ICO

Windows Icon resources

Audio file

AU
SND

NeXT/Sun sound

auread

auwrite

WAV

Microsoft WAVE sound

wavread

wavwrite

Video (all platforms)

AVI

Audio Video Interleave

VideoReader

VideoWriter

MJ2

Motion JPEG 2000

Video (Windows)

MPG

MPEG-1

VideoReadernone

ASF
ASX
WMV

Windows Media®

any

Formats supported by Microsoft DirectShow®

Video (Windows 7)

MP4
M4V

MPEG-4

VideoReadernone

MOV

QuickTime®

any

Formats supported by Microsoft Media Foundation

Video (Mac®)

MPG
MP4
M4V

MPEG-1 and MPEG-4

VideoReadernone

MOV

QuickTime

any

Formats supported by QuickTime, including .3gp, .3g2, and .dv

Video (Linux®)

any

Formats supported by your installed GStreamer plug-ins, including .ogg

VideoReadernone

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS