复现公式,但是出图像是空白图。
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
果博东方开户中心【微8785092】
el 17 de Mayo de 2023
Respondida: 果博东方开户热线【微8785092】
el 17 de Mayo de 2023
clear;
clc;
lamda=1550e-9;
fs=500e6;
T=400e-9;
w=sqrt(log(2))/(sqrt(2)*pi*T*fs);
M=T*fs;
N=[100,1000,10000];
LineSpec=[':','.-','-']
for i=1:length(N)
N1=N(i);
line=LineSpec(i);
CNR1=linspace(-40,10,50);
CNR=10.^(CNR1/10);
V_cr1=zeros(1,50);
qianzhixishu1=lamda*fs*w/(2*sqrt(N1*M));
for index=1:50;
houzhixishu=@(f)(f./w).^2./(1+(CNR(index)./(sqrt(2*pi).*w).*exp(-f.^2./(2.*w.^2))).^-1).^2;
res=integral(houzhixishu,-1/2,-1/2);
V_cr1(index)=qianzhixishu1*(res.^(-1/2));
end
semilogy(CNR1,V_cr1,line);hold on
end
title('V_c_r_l_b with CNR');
ylabel('V_c_r_l_b(m/s)');
xlabel('CNR(dB)');
ylim([1e-3,1e1])
lgd=legend({'N=100','N=1000','N=10000'});
title(lgd,'N');
版本R2020b
求大佬救救孩子!!!
0 comentarios
Respuesta aceptada
果博东方开户热线【微8785092】
el 17 de Mayo de 2023
你的 res 按积分算出来是0,导致后面 res.^(-1/2) 这一步运算使数值变成了没法绘制的 inf。
至于更底层的原因,你得自己回去检查公式写对没写对、计算精度够不够之类。
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!