代码已贴,索引超处数组边界怎么修改。
Afficher commentaires plus anciens
clear all;
theta=70;
m=-log10(2)/log10(cosd(theta));
P_LED=1;
nLED=60;
P_total=nLED*nLED*P_LED;
Ar=1;
Ts=1;
index=1.5;
FOV=70;
G_Con=(index^2)/(sind(FOV).^2);
rho=0.7;
B=100;
Ibg=5100;
gama=1.5;
Tk=298;
G=10;
eta=112;
gm=30;
I2=0.562;
I3=0.086;
q=1.602176487E-19; %电子电荷量
k=1.380649e-23;
R=0.55; %光电转换系数
lx=10;
ly=10;
lz=3;
h=3;
%1个LED的位置
T1=[2,8,h];
Nx=lx*2.5;
Ny=ly*2.5;
Nz=lz*5;
dA=lz*ly/(Ny*Nz);
x=linspace(0,lx,Nx);
y=linspace(0,ly,Ny);
z=linspace(0.2,lz,Nz);
[XR,YR]=meshgrid(x,y);
D1=sqrt((XR-T1(1,1)).^2+(YR-T1(1,1)).^2+h.^2);
cosphi_A1=h./D1;
receiver_angle=acosd(cosphi_A1);
H_A1=(m+1)*Ar.*cosphi_A1.^(m+1)./(2*pi.*D1.^2);
P_rec_A1=P_total.*H_A1.*Ts.*G_Con;
P_rec_A1(find(abs(receiver_angle)>FOV))=0;
P_rec_total=P_rec_A1;
P_rec_dBm=10*log10(P_rec_total);
figure(1)
surfc(x,y,P_rec_dBm);
zlabel('LOS接收光功率分布/dB');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 显示和探查 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!