function z = zernpol(n,m,r,nflag) )yyH_Ax2
%ZERNPOL Radial Zernike polynomials of order N and frequency M. R{c~jjd
% Z = ZERNPOL(N,M,R) returns the radial Zernike polynomials of 9~`#aQG T
% order N and frequency M, evaluated at R. N is a vector of bK6^<,~
% positive integers (including 0), and M is a vector with the 8a*&,W
% same number of elements as N. Each element k of M must be a 2n3&uvf'TL
% positive integer, with possible values M(k) = 0,2,4,...,N(k) 5 <k)tF%
% for N(k) even, and M(k) = 1,3,5,...,N(k) for N(k) odd. R is zV}:~;w
% a vector of numbers between 0 and 1. The output Z is a matrix eikZ~!@
% with one column for every (N,M) pair, and one row for every =)Hu(;Yv
% element in R. *=oO3c0|b,
% ;@S'8
% Z = ZERNPOL(N,M,R,'norm') returns the normalized Zernike poly- WD\Yx~o
% nomials. The normalization factor Nnm = sqrt(2*(n+1)) is $B?8\>_?
% chosen so that the integral of (r * [Znm(r)]^2) from r=0 to %ud-3u52M8
% r=1 is unity. For the non-normalized polynomials, Znm(r=1)=1 MUbKlX
% for all [n,m]. 3!F^vZ.
% T(u;<}e@[
% The radial Zernike polynomials are the radial portion of the 0&