資源簡(jiǎn)介
zernike 多項(xiàng)式的MATLAB實(shí)現(xiàn)
代碼片段和文件信息
function?z?=?zernfun(prthetanflag)
%???zernfun(prthetanflag)?returns?the?Pth?Zernike?functions?evaluated
%???at?positions?(RTHETA)?on?the?unit?circle.??P?is?a?vector?of?positive
%???integers?between?0?and?35?R?is?a?vector?of?numbers?between?0?and?1
%???and?THETA?is?a?vector?of?angles.??R?and?THETA?must?have?the?same
%???length.??The?output?Z?is?a?matrix?with?one?column?for?every?P-value
%???and?one?row?for?every?(RTHETA)?pair.
%
%???Z?=?ZERNFUN2(PRTHETA‘norm‘)?returns?the?normalized?Zernike
%???functions?defined?such?that?the?integral?of?(r?*?[Zp(rtheta)]^2)
%???over?the?unit?circle?(from?r=0?to?r=1?and?theta=0?to?theta=2*pi)
%???is?unity.??For?the?non-normalized?polynomials?max(Zp(r=1theta))=1
%???for?all?p.
%?Check?and?prepare?the?inputs:
%?-----------------------------
if?min(size(p))~=1
????error(‘zernfun2:Pvector‘‘Input?P?must?be?vector.‘)
end
if?any(p)>35
????error(‘zernfun2:P36‘?...
??????????[‘ZERNFUN2?only?computes?the?first?36?Zern
評(píng)論
共有 條評(píng)論