CS计算机代考程序代写 clear all

clear all
clc
arph_set=[0.1,0.5,0.5,1];
beta_set=[0.1,0.5,1,0.5];
P=20;%transmit power
N0=1;%spatial power spectral density N0
z0=4;% user location
A=(0.05:10:400); % IRS surface area
delta=zeros(size(arph_set,1),size(A,2));%the capacity degradation can be measured by the received SNR losss with HWI
figure(1)
Color = linspecer(4);
sizeType={‘^’,’<','*','o','s'}; for i=1:length(arph_set) arph=arph_set(i); beta=beta_set(i); delta(i,:)=1+4.^(beta-1).*P.*arph.*A.^(2*beta)./((beta+1).*z0.^2.*pi.^(beta+1).*N0); % calculate the SNR losses % delta(i,:)=1+P.*arph.*A.^(2*beta)./(4*pi*z0.^2.*N0); % under the condition of beta << 1 semilogy(A,delta(i,:),'-*','color',Color(i,:),'marker',sizeType{i}); hold on end xlabel('Surface-area A[m^2]') ylabel('\sigma [dB]') legend('\alpha=0.1,\beta=0.1','\alpha=0.5,\beta=0.5','\alpha=0.5,\beta=1','\alpha=1,\beta=0.5','Location','northwest'); grid on