23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7 Working with Scientific Data Formats<br />

• “Step 4: Importing Data and Metadata” on page 7-39<br />

• “Step 5: Closing HDF Files and the HDF Import Tool” on page 7-40<br />

The following sections provide more detail about each of these steps.<br />

Step 1: Opening an HDF4 File in the HDF Import Tool<br />

Open an HDF4 or HDF-EOS file in <strong>MATLAB</strong> using one of the following<br />

methods:<br />

• Choose the Import Data option from the <strong>MATLAB</strong> File menu. If you select<br />

an HDF4 or HDF-EOS file, the <strong>MATLAB</strong> Import Wizard automatically<br />

starts the HDF Import Tool.<br />

• Start the HDF Import Tool by entering the hdftool command at the<br />

<strong>MATLAB</strong> command line:<br />

hdftool<br />

This opens an empty HDF Import Tool. To open a file, click the Open<br />

option on the HDFTool File menu and select the file you want to open. You<br />

can open multiple files in the HDF Import Tool.<br />

• Open an HDF or HDF-EOS file by specifying the file name with the<br />

hdftool command on the <strong>MATLAB</strong> command line:<br />

hdftool('example.hdf')<br />

Viewing a File in the HDF Import Tool. WhenyouopenanHDF4or<br />

HDF-EOS file in the HDF Import Tool, the tool displays the contents of the<br />

file in the Contents pane. You can use this pane to navigate within the file<br />

to see what data sets it contains. You can view the contents of HDF-EOS<br />

files as HDF data sets or as HDF-EOS files. The icon in the contents pane<br />

indicates the view, as illustrated in the following figure. Note that these are<br />

just two views of the same data.<br />

7-36

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

Saved successfully!

Ooh no, something went wrong!