File: fsf_test.m

package info (click to toggle)
svxlink 19.09.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 15,060 kB
  • sloc: cpp: 59,837; tcl: 4,311; ansic: 2,823; sh: 1,325; javascript: 429; python: 391; perl: 335; ruby: 160; makefile: 113
file content (65 lines) | stat: -rw-r--r-- 1,281 bytes parent folder | download
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
63
64
65
%% Filter in Lyons UDSP Problem 7.19
N=8;
r=1;
resG=ones(1, 3);
Htot=fsf(N, r, resG);
fvtool(Htot)

%% AFSK-filter, fc=5500Hz, BW=400Hz
%N=256;
N=128;
r=0.99999;
T11=0.38814788;
T21=0.5924029;
T22=0.107170355;
resG=zeros(1, N/2);
%resG(87:91)=ones(1,5);
%resG(86:92)=[T11 ones(1,5) T11];
T11_64=0.42815077;
T11_3_128=0.39811024;
T12_3_128=0.59383385;
T22_3_128=0.10601544;
resG(43:47)=[T11_3_128 ones(1,3) T11_3_128];
T11_1_64=0.42815077;
%resG(22:24)=[T11_1_64 1 T11_1_64];
%resG(85:93)=[T22 T21 ones(1,5) T21 T22];
Htot=fsf(N, r, resG);
fvtool(Htot)

%% AFSK-filter, fc=1700Hz, BW=1200Hz
%N=256;
N=160;
r=0.99999;
T11=0.38814788;
T21=0.5924029;
T22=0.107170355;
resG=zeros(1, N/2);
%resG(87:91)=ones(1,5);
%resG(86:92)=[T11 ones(1,5) T11];
T11_64=0.42815077;
T11_3_128=0.39811024;
T12_3_128=0.59383385;
T22_3_128=0.10601544;
resG(11:25)=[0.3745 ones(1,13) 0.3745];
T11_1_64=0.42815077;
Htot=fsf(N, r, resG);
fvtool(Htot)

%% Comb filters only
Htot=fsf(8, r, []);
fvtool(Htot)

%% CTCSS-filter, flow=67, fhigh=270
N=256;
r=0.99999;
T11=0.38814788;
T21=0.5924029;
T22=0.107170355;
T13_256=0.39839019;
T14_256=0.39231838;
resG=zeros(1, N/2);
%resG(87:91)=ones(1,5);
resG(2:6)=[T13_256 ones(1,3) T13_256];
%resG(85:93)=[T22 T21 ones(1,5) T21 T22];
Htot=fsf(N, r, resG);
fvtool(Htot)