23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7 Working with Scientific Data Formats<br />

Once you specify the dimension or field, you use Min and Max to specify<br />

the range of values that you want to import. For dimensions, Min and Max<br />

represent a range of elements. For fields, Min and Max represent a range<br />

of values.<br />

HDF Raster Image Data<br />

For 8-bit HDF raster image data, you can specify the colormap.<br />

Using the <strong>MATLAB</strong> HDF4 High-Level Functions<br />

To import data from an HDF or HDF-EOS file, you can use the <strong>MATLAB</strong><br />

HDF4 high-level function hdfread. The hdfread function provides a<br />

programmatic way to import data from an HDF4 or HDF-EOS file that still<br />

hides many of the details that you need to know if you use the low-level HDF<br />

functions, described in “Using the HDF4 Low-Level Functions” on page 7-55.<br />

You can also import HDF4 data using an interactive GUI, described in “Using<br />

the HDF Import Tool” on page 7-35.<br />

This section describes these high-level <strong>MATLAB</strong> HDF functions, including<br />

• “Using hdfinfo to Get Information About an HDF4 File” on page 7-52<br />

• “Using hdfread to Import Data from an HDF4 File” on page 7-53<br />

To export data to an HDF4 file, you must use the <strong>MATLAB</strong> HDF4 low-level<br />

functions.<br />

Using hdfinfo to Get Information About an HDF4 File<br />

To get information about the contents of an HDF4 file, use the hdfinfo<br />

function. The hdfinfo function returns a structure that contains information<br />

aboutthefileandthedatainthefile.<br />

Note You can also use the HDF Import Tool to get information about the<br />

contents of an HDF4 file. See “Using the HDF Import Tool” on page 7-35<br />

for more information.<br />

7-52

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!