clear %INPUT section snr1=1;snr2=10; alfa=0.01:0.01:0.99; new_plot=0; TDM=0; %show TDM mux (black) FDM=0; %show FDM mux (blu) ICW=0; %show IC mux the worst decoded first (red solid) ICB=0; %show IC mux the best decoded first (red dash-dotted) ICP=1; %show IC mux the worst decoded first but partly suppressed (red dashed) rf=.20; %not suppressed interference if (new_plot) subplot(1,2,1); box on xlabel('c_{best}'); ylabel('c_{worst}'); hold on subplot(1,2,2) box on xlabel('\alpha') ylabel('c_best+c_worst') hold on end %FDM if (FDM) betav=0.1:0.1:0.9; snrw=min(snr1,snr2); snrb=max(snr1,snr2); for i=1:length(betav), c1=alfa.*log2(1+betav(i)*snrb./alfa); c2=(1-alfa).*log2(1+(1-betav(i))*snrw./(1-alfa)); subplot(1,2,1) plot(c1,c2,'b') subplot(1,2,2) plot(alfa,c1+c2,'b') end end %TDM if (TDM) snrw=min(snr1,snr2); snrb=max(snr1,snr2); c1=alfa*log2(1+snrb); c2=(1-alfa)*log2(1+snrw); subplot(1,2,1) plot(c1,c2,'k-') subplot(1,2,2) plot(alfa,c1+c2,'k') end %CDM weak first if (ICW) snrw=min(snr1,snr2); snrb=max(snr1,snr2); c1=log2(1+alfa*snrb); c2=log2(1+(1-alfa)./(alfa+1/snrw)); subplot(1,2,1) plot(c1,c2,'r') subplot(1,2,2) plot(alfa,c1+c2,'r') end %strong first if (ICB) snrw=min(snr1,snr2); snrb=max(snr1,snr2); c1=log2(1+alfa./((1-alfa)+1/snrb)); c2=log2(1+(1-alfa)*snrw); subplot(1,2,1) plot(c1,c2,'r-.') subplot(1,2,2) plot(alfa,c1+c2,'r-.') end %incomplete suppression if (ICP) snrw=min(snr1,snr2); snrb=max(snr1,snr2); c1=log2(1+alfa./((1-alfa)*rf+1/snrb)); c2=log2(1+(1-alfa)./(alfa+1/snrw)); subplot(1,2,1) plot(c1,c2,'r--') subplot(1,2,2) plot(alfa,c1+c2,'r--') end