复现公式,但是出图像是空白图。
Show older comments
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
求大佬救救孩子!!!
Accepted Answer
More Answers (0)
Categories
Find more on Physics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!