-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_LL.m
55 lines (55 loc) · 1.1 KB
/
data_LL.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
clc;
clear;
addpath("data\");
addpath("functions\");
%% Calculate Arc LL ratio
y_c = zeros(1, 4);
x_c = zeros(1, 4);
for n = 1: 4
switch n
case 1
load("data_c1.mat");
case 2
load("data_c2.mat");
case 3
load("data_c3.mat");
case 4
load("data_c4.mat");
otherwise
disp('otherwise');
end
y_c(n) = gaussian_LL(data);
x_c(n) = n;
end
%% Calculate Straight LL ratio
y_s = zeros(1, 6);
x_s = zeros(1, 6);
for n = 1: 6
switch n
case 1
load("data_s1.mat");
case 2
load("data_s2.mat");
case 3
load("data_s3.mat");
case 4
load("data_s4.mat");
case 5
load("data_s5.mat");
case 6
load("data_s6.mat");
otherwise
disp('otherwise');
end
y_s(n) = gaussian_LL(data);
x_s(n) = n;
end
%% Save data
% curvature
data_arc.x = x_c;
data_arc.y = y_c;
save('data\data_arc.mat', 'data_arc');
% straight
data_str.x = x_s;
data_str.y = y_s;
save('data\data_str.mat', 'data_str');