File Exchange

image thumbnail


version 1.0 (6.75 KB) by

Compute Zernike polynomials and coefficients of a Zernike fit with mutually consistent functions.



View License

Zernike polynomials are orthogonal on the unit circle and are commonly used in optics for phase aberrations.

Use zernike_fcn3.m to generate Zernike polynomials. Input includes a vector of the desired polynomials; these do not have to be consecutive. Possible polynomial orderings include:
'noll' = Bob Noll's original ordering
'fringe' = Univ. of Arizona Zernike set
'original'= original order of zernfun.m
'default' = the 'fringe' (UofA) set + more terms
zernike_fcn3.m does consistency checking, selects the appropriate m & n values for a particular ordering and then calls zernfun.m to generate the polynomials.

Use zernike_coeffs3.m to fit Zernike polynomial to an input function. Since zernike_coeffs3.m calls zernike_fcn3.m, these files are automatically consistent with each other, unlike some previous functions.

Comments and Ratings (3)

Zeng Zhen

David Marx

I think the ordering for Noll ordered Zernike polynomials in Zernike_fcn3 is incorrect. All the even order terms have the sin and cos terms reversed compared to Noll's paper and also compared to the Zemax manual.

Robin Martin


MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today