gainki.m
来自「Cordic算法的Matlab实现」· M 代码 · 共 16 行
M
16 行
%% description
% this program can be used to compute the gain of CORDIC
% processing systems at each iterative step
% Inputs:
% m, represents the mode of the computing system
% Fi, elementary shifts for the i-th iteration
% CAUTION: m and Fi can be both vectors
% Outputs:
% Ki, i-th processing gain
%% code
function Ki=gainKi(Fi,m)
Ki=sqrt(1+m.*2.^(-2*Fi));
if(m==-1 && Fi(1)==0)% when m=-1, Fi can't be 0
Ki(1)=1;
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?