anti_tagnum_aver.m

来自「此代码为RFID中防冲突算法固定帧ALOHA算法中的」· M 代码 · 共 30 行

M
30
字号
%"RFID技术中的防碰撞算法研究”式3-3
function e=anti_tagnum_aver(N)

e=zeros(N,8);
e1=0;

%for m=1:8
    F=2^4;
for j=2:N
    for i=2:j
        e1=i*anti_tagnum(j,F,i);
        e(j,4)=e(j,4)+e1;
        %e=e+e1;
    end
end

j=1:N;
hold on
%plot(e(:,1),'b');
%plot(e(:,2),'c');
%plot(e(:,3),'g');
plot(e(:,4));
xlabel('The number of tags N');
ylabel('The expected value e');
gtext('The frame size F=16');
%plot(e(:,5),'m');
%plot(e(:,6),'r');
%plot(e(:,7),'b-');
%plot(e(:,8),'y');
end

⌨️ 快捷键说明

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