⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gainan.m

📁 Cordic算法的Matlab实现
💻 M
字号:
%% description
%   this routine is written to analysis the relationship
%   between n and An. Theoretically, as n approach infinite,
%   An will be a constant. What's more important, we will
%   study on the difference between the constant and An to
%   look into how many steps the algorithm takes to make
%   the precision of the results up to our expectation.
%   Input
%       F, shifting sequences in the form of comun vector(s)
%       m, mode
%   Output
%       An, gain of the algorithm
%% code
function An=gainAn(F,m)
[row,column]=size(F);
An=ones(column);% initialize An
if(m)% m!=0 No linear mode
    for j=1:column
        Ki=gainKi(F(:,j),m);% select Fi=i, mode
        %compute An for j-th column
        for i=1:row
            An(j)=An(j)*Ki(i);
        end
    end
end
% %plot
% plot(n,An,'ro'),hold on
% plot(n,An,'g'),hold off
% ends function
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -