?? tutorial_transmit.m
字號:
function tutorial % Create the base stations par.cellradius=1000; par.sps=1; par.km=1; par.lm=2; par.ncluster=2; [xyb,fib,rombvec]=crecells(par.cellradius,par.sps,par.km,par.lm,par.ncluster); % Create new mobiles par.vmean=10; par.amean=5; par.dt=10; nmob=30; xym=nans(nmob,1); xyv=nans(nmob,1); m=(1:nmob).'; [xym,xyv]=mobmove(xym,xyv,par.vmean,par.amean,par.dt,rombvec); % Create the antenna lobe lobevector=zeros(360,1); % Calculate the gain between bases and mobiles par.attconst=-21; par.alpha=4; par.sigma=8; par.raa=0.5; par.corrdist=110; [lognmap, mapvec] = crelognmap(xyb, rombvec, par.corrdist); g=pathgain(xym,xyb,fib,rombvec,par.attconst,par.alpha, par.sigma, par.raa, lobevector, lognmap, mapvec); % Create a channel plan par.kpc=5; % The number of channels per cell reuseFactor=par.km^2+par.lm^2+par.km*par.lm; obk=crechanplan(length(xyb),par.kpc*reuseFactor,par.ncluster); % Create the necessary data structures and assign the mobiles to their channels b=nans(nmob,1); k=nans(nmob,1); [b,k,obk]=assign(b,k,g,obk,0); % Assign power to the mobiles par.pinit=30; pul=nans(nmob,1); pdl=nans(nmob,1); pul(~isnan(k))=par.pinit; pdl(~isnan(k))=par.pinit; % Calculate carrier, interference and signal to interference ratio par.noise=-120; [cul, iul, sirul]=transmitul(b, k, pul, g, par.noise); [cdl, idl, sirdl]=transmitdl(b, k, pdl, g, par.noise); % Plot the system figure(1); plothex(xyb,fib); hold on; plot(xym,'b*'); hold off; % Plot the cdf of the carrier to interference ratio in the downlink figure(2); cdfplotlow(clean(sirdl));
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -