function TimeAnalysis()
global SamplingFreq IF SatelliteNum FreqBand StartMs AnalysisMs ReadLengthMs AcquireBW StandardFreq
fb=IF;
fs=SamplingFreq;
fstan=StandardFreq;
f0=fb-fs;
LL=20;
switch FreqBand
case 4
load Local_E1I1.mat
load Local_E1I2.mat
load Local_E1Q.mat
load s_demoE1.mat
s1=real(s_demoE1);
s2=imag(s_demoE1);
Bandwide_filter=32.736e+6;
n1=fs/1000*4;
n2=fs/1000*2;
fc1=1*fstan;
fc2=2.5*fstan;
[MM NN]=max(abs(xcorr(Local_E1I1(1:n1),s1(1:n1))));
[MM1 NN1]=max(abs(xcorr(Local_E1I2(1:n1),s1(1:n1))));
if abs(MM)>=abs(MM1)
Local_E1I=Local_E1I1(1:n1);
else
Local_E1I=Local_E1I2(1:n1);
end
if max(xcorr(Local_E1I(1:n1),s1(1:n1)))-max(abs(xcorr(Local_E1I(1:n1),s1(1:n1))))~=0
Local_E1I=-Local_E1I;
end
Local_E1I=sqrt(2)/3*Local_E1I;
Local_E1I_filter=lp_filter(Bandwide_filter/2,Local_E1I(1:n1));
if max(xcorr(Local_E1Q(1:n2),s2(1:n2)))-max(abs(xcorr(Local_E1Q(1:n2),s2(1:n2))))~=0
Local_E1Q=-Local_E1Q;
end
Local_E1Q=2/3*Local_E1Q;
Local_E1Q_filter=lp_filter(Bandwide_filter/2,Local_E1Q(1:n2));
%%%%%%%%%时域波形及信噪比
figure
plot(s1(1:ceil(fs/fc1)*LL),'r')
hold on
plot(Local_E1I(1:ceil(fs/fc1)*LL),'b-.','LineWidth',1.5)
hold on
plot(Local_E1I_filter(1:ceil(fs/fc1)*LL),'k')
legend
title;
figure
plot(s2(1:ceil(fs/fc2)*LL),'r')
hold on
plot(Local_E1Q(1:ceil(fs/fc2)*LL),'b-.','LineWidth',1.5)
hold on
plot(Local_E1Q_filter(1:ceil(fs/fc2)*LL),'k')
legend
title;
snr1=SNR(Local_E1I(1:n1),s1(1:n1))
snr2=SNR(Local_E1I_filter(1:n1),s1(1:n1))
histgramFigure(s1(1:n1))
histgramFigure(s2(1:n2))
eyeFigure(s1(1:n1),fs,fc1)
eyeFigure(s2(1:n2),fs,fc2)
end
主要是针对这个程序,我不知道再写一个什么样的程序才可以运行。