function z = zernpol(n,m,r,nflag) ~_'0]P\
%ZERNPOL Radial Zernike polynomials of order N and frequency M. -@rxiC:Q
% Z = ZERNPOL(N,M,R) returns the radial Zernike polynomials of ?3`q+[:
% order N and frequency M, evaluated at R. N is a vector of sa_R$ /H
% positive integers (including 0), and M is a vector with the CV s8s
% same number of elements as N. Each element k of M must be a fs&,w
% positive integer, with possible values M(k) = 0,2,4,...,N(k) C1V# ?03eI
% for N(k) even, and M(k) = 1,3,5,...,N(k) for N(k) odd. R is 'nMApPl
% a vector of numbers between 0 and 1. The output Z is a matrix O~.U:45t
% with one column for every (N,M) pair, and one row for every U);OR
% element in R. {T&v2u#S
% 6MuWlCKF8
% Z = ZERNPOL(N,M,R,'norm') returns the normalized Zernike poly- 3=Z<wD s
% nomials. The normalization factor Nnm = sqrt(2*(n+1)) is (Up'$J}
% chosen so that the integral of (r * [Znm(r)]^2) from r=0 to =K:(&6f<t
% r=1 is unity. For the non-normalized polynomials, Znm(r=1)=1 mV<i JZh
% for all [n,m]. DMB"Y,
% QjLji+L
% The radial Zernike polynomials are the radial portion of the !(Q l)C
% Zernike functions, which are an orthogonal basis on the unit \yM-O- {
% circle. The series representation of the radial Zernike v51EXf
% polynomials is -&im