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 />

returned_data = H5D.read(datasetID,'H5ML_DEFAULT',...<br />

'H5S_ALL','H5S_ALL','H5P_DEFAULT');<br />

Note that the data returned must be indexed in reverse order: HDF5 stores<br />

the data in row-major order; <strong>MATLAB</strong> accesses data in column-major<br />

order. To rearrange the data into column-major order, use the <strong>MATLAB</strong><br />

permute function.<br />

data = permute(returned_data,[3 2 1]);<br />

You can compare the original <strong>MATLAB</strong> variable, testdata, withthe<br />

variable just created, data, toseeiftheyarethesame.<br />

7-34

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

Saved successfully!

Ooh no, something went wrong!