Q2dChebyshevFit: Fit MSF surface to 2dQ polynomials

Version 1.0.0 (7.34 KB) by Yiwen Fan
Rapid and accurate surface fitting that supporting thousands of Q terms
10 Downloads
Updated 27 May 2025

View License

Function for fitting a surface to 2DQ polynomials
Usage:
  • [amn, bmn, z_recon_map] = Q2dChebyshevFit(z_map, M, N, J, K)
Description:
  • This function takes as input a freeform surface and fits it to 2D-Q polynomials, returning the coefficients of the fit as well as the reconstructed map.
Inputs:
  • z_map - The sag table of the freeform surface.
  • M - The highest azimutal fitting order.
  • N - The highest radial fitting order.
  • J - The sampling number on azimuthal direction, default: 2M+1
  • K - The sampling number on radial direction, default: 2(N+1)
Outputs:
  • amn, bmn - The fitted coefficients z_recon_map
  • The surface calculated by amn, bmn coefficients
Author: Yiwen Fan (yfan22@ur.rochester.edu)
Date: 05/22/2025
Acknowledgments:
---
There is another function I developed that fits MSF surfaces to Zernike polynomials https://www.mathworks.com/matlabcentral/fileexchange/132713-zernikelegendrefit-fast-precise-high-capacity-fitting

Cite As

Yiwen Fan (2025). Q2dChebyshevFit: Fit MSF surface to 2dQ polynomials (https://uk.mathworks.com/matlabcentral/fileexchange/181194-q2dchebyshevfit-fit-msf-surface-to-2dq-polynomials), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2025a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0