wzy0628aq 发表于 2009-5-5 17:01

谁帮忙给这段程序加个注释啊。。谢谢哦

这是计算图像投影的函数。。哪位高手帮忙给加个注释,小弟感激不尽啊。。
function = radon(I,theta,n);
iptchecknargin(1, 3, nargin, mfilename)
iptcheckinput(I,{'numeric','logical'},{'nonsparse'},mfilename,'I',1);

if (nargin < 2)
    theta = 0:179;
else
ptcheckinput(theta,{'double'},{'nonsparse'},mfilename,'THETA',2);
end

= radonc(double(I),theta);

if (nargin == 3) && (size(P,1) ~= n)
% Grandfathered syntax
    % Resize along the column direction using linear interpolation.
    new_r = linspace(min(r), max(r), n)';
    P = interp1(r(:), P, new_r(:), '*linear');
    P = P * length(r) / length(new_r);% keeps scaling roughly the same
    r = new_r;
end

ChaChing 发表于 2009-5-5 18:12

help iptchecknargin
help iptcheckinput
...
有些函数好像找不到!
页: [1]
查看完整版本: 谁帮忙给这段程序加个注释啊。。谢谢哦