To read in data from an h5 file using Matlab, you need to know the data structure inside of it - the text strings specifying datasets in the h5 file. A good way to know the data structure is to open the h5 file first in HDFview (which is free, available for both Mac and Windows, and can be downloaded from the web).
Here is a demo on how to read in information from h5 files, and fit the surface to annular or standard Zernikes.
on Matlab command line, run
>> h5demo(1)
or
>> h5demo(3)
where there is only one input parameter: 1 is for M1 and 3 is for M3. Line#10 and #14 will need to be changed to point to the h5 files one intends to analyze.
In this demo, we
The subroutines that are needed:
If standard Zernikes are desired instead of the annular Zernikes, the following subroutines should be used accordingly.