-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_tools.m
More file actions
41 lines (31 loc) · 843 Bytes
/
Copy pathsetup_tools.m
File metadata and controls
41 lines (31 loc) · 843 Bytes
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
clear
clc
collect_gamma = [];
collect_phase = [];
for gamma = 1:1e-2:10
phase = LADRC1_phase(gamma);
collect_gamma = [collect_gamma, gamma];
collect_phase = [collect_phase, phase];
end
gamma1 = collect_gamma;
phase1 = collect_phase;
collect_gamma = [];
collect_phase = [];
for gamma = 1:1e-2:10
phase = LADRC2_phase(gamma);
collect_gamma = [collect_gamma, gamma];
collect_phase = [collect_phase, phase];
end
gamma2 = collect_gamma;
phase2 = collect_phase;
clear collect_gamma;
clear collect_phase;
save('gamma_map.mat','gamma1', 'phase1', 'gamma2', 'phase2');
function phase = LADRC2_phase(gamma)
[C, ~] = LADRC2(gamma^2, 1, 1);
phase = rad2deg(angle(freqresp(C, gamma)));
end
function phase = LADRC1_phase(gamma)
[C, ~] = LADRC1(gamma^2, 1, 1);
phase = rad2deg(angle(freqresp(C, gamma)));
end