Rank: 47866 based on 0 downloads (last 30 days) and 0 file submitted

Chauncey Graetzel


Personal Profile:


Watch this Author's files


Comments and Ratings by Chauncey Graetzel
Updated File Comments Rating
10 Mar 2011 Zernike polynomials Zernike polynomials and functions (orthogonal basis on the unit circle). Author: Paul Fricker

I was running into problems when using my fitted terms in another program: the same coefficients did not give the same surface.
I found the cause: the cosine and sine terms are inverted in zernfun. M>0 should be a cosine, while M<0 should be a sine.

I've corrected this, starting at line 193

if any(idx_pos)
z(:,idx_pos) = y(:,idx_pos).*cos(theta*m(idx_pos)');
if any(idx_neg)
z(:,idx_neg) = y(:,idx_neg).*sin(theta*-m(idx_neg)');

% note the required sign change "-m" in the sine term

Contact us