mean_sum.m

来自「Describes how to find the theta value in」· M 代码 · 共 33 行

M
33
字号
function Mean = Mean_Sum(In_Sig,h)
% Find the total sum of the mean value of the transmitted bit sequence.
l = length(In_Sig);

E = zeros (1,l);


for i=1:l
    if In_Sig(i)== 1
        Ai = 1;   % If one then Aj will be 1
    elseif In_Sig(i) == 0
        Ai = -1;  % If one then Aj will be -1
    end;
    
    if i==1
        E(1) = (1-sinc(2*h));   % should be multiplied by T/2
    else
        %Sin (theta) + (Ai/2*pi*h)*[Cos(theta) - Cos(2*pi*h*Ai + theta)]
        
        E(i) = (sin(pi*h))*((cos(pi*h))^(i-2))*(sin(theta_i(In_Sig,h)) + (Ai/(2*pi*h))* (cos(theta_i(In_Sig,h)) - cos((2*pi*h*Ai) + (theta_i(In_Sig,h)))));
        % % should be multiplied by T/2
    end
end

Mean = E(1);

for i=2:length(In_Sig)
    Mean = Mean + E(i);
    
    % M_Lamda = Mean* (T/2) * (2*Eb/Tb)
end

⌨️ 快捷键说明

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