-
Notifications
You must be signed in to change notification settings - Fork 0
/
ftsigpul_fsigpul.m
62 lines (57 loc) · 1.53 KB
/
ftsigpul_fsigpul.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
c=3*10^8;
lam=1560;%데貫nm
fc=c/(lam*10^(-9));
wc=2*pi*fc*10^(-12);%데貫rad*ps^(-1)
% fsigpul=2.746*10^12/2.355;%데貫Hz
frep=50*10^6;%데貫Hz
Trep=1/frep*10^12;%데貫ps
fceo=100*10^6;
Tceo=1/fceo*10^12;%데貫ps
wceo=2*pi*fceo*10^(-12);%데貫谿wc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ftmin=-450;
ftmax=450;
fdt=1;
ft=ftmin:fdt:ftmax;%데貫fs
ftn=length(ft);
fE=zeros(1,ftn);
E=zeros(1,ftn);
ftfs=ft*10^(-15);
ftsigpul=zeros(1,51);
ftsi=1;
for fsigpul=0.016*10^12:0.2*10^12:10.016*10^12
%%%\틉堵쉔친%%%
fr=fc-3.5*10^12:frep:fc+3.5*10^12;
frn=length(fr);
fbao=(1/((2*pi)^0.5*fsigpul))*exp(-(fr-fc).^2/(2*fsigpul^2));
%%%%%%%%%%%%%%%%%%%북냥%%%%%%%%%%%%%%%%%%%%%%%
for frr=1:frn
fE=fbao(frr)*cos(2*pi*fr(frr)*ftfs);%늪珂ft데貫槨fs。
E=E+fE;
end;
%%%%%%%%%%%헹관쭹%%%%%%%%%%%%%
Ebao=zeros(1,ftn);
for ftbao=1:ftn
Ebao(ftbao)=E(ftbao)/(cos(2*pi*fc*ftfs(ftbao)));
end;
%%%%%%%%%%%%%헹곕욱멕%%%%%%%%%%%%%%%
tmaxhalf=0.5*max(Ebao);
EEbao=abs(Ebao-tmaxhalf);
half=(ftn-1)/2;
[ezuo,tzuo]=min(EEbao(1:half));
[eyou,tyou]=min(EEbao(half+1:ftn));
ftsigpul(ftsi)=ft(half+tyou)-ft(tzuo);
ftsi=ftsi+1;
end;
fsigpul=0.016*10^12:0.2*10^12:10.016*10^12;%데貫Hz
%%%%%%%%%%%%혓窟%%%%%%%%%%%%%%%%%%
% fts=ft/1000;%데貫ps
% subplot(2,1,1)
% plot(fts,Ebao);grid;
% xlabel('珂쇌/ps');
% ylabel('驪류');
% hold on;
% subplot(2,1,2)
plot(fsigpul,ftsigpul);grid;
xlabel('틉堵곕멕욱/Hz');
ylabel('珂堵찧녑욱똑/fs');