Zernike Polynomial Coefficients for a given Wavefront using Matrix Inversion in Matlab
Represent a wavefront as a sum of Zernike polynomials using a matrix inversion.
This function attempts to solve the a_i's in equation, phi(rho,theta) = SUM(a_i * Z_i(rho,theta), i=1 to M),
where the Z_i(rho,theta)'s are the Zernike polynomials from the zernfun.m file, phi is the wavefront to be represented as a sum of Zernike polynomials, the a_i's are the Zernike coefficients, and M is the number of Zernike polynomials to use.
Input: phi - Phase to be represented as a sum of Zernike polynomials that must be an nXn array (square)
(optional) M - Number of Zernike polynomials to use (Default = 12)
Output: a - Zernike coefficients (a_i's) as a vector Note: zernfun.m is required for use with this file. It is available here: http://www.mathworks.com/matlabcentral/fileexchange/7687
Cite As
Christopher Wilcox (2024). Zernike Polynomial Coefficients for a given Wavefront using Matrix Inversion in Matlab (https://www.mathworks.com/matlabcentral/fileexchange/27072-zernike-polynomial-coefficients-for-a-given-wavefront-using-matrix-inversion-in-matlab), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |