-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettable.m
63 lines (61 loc) · 1.77 KB
/
settable.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
63
function newtable = settable(list,refine)
newtable = {};
% for i=1:size(tableget,1)
% newtable{i,1} = tableget{i,1};
% if (strcmp(tableget{i,2},list{i,1}) == 1)
% newtable{i,2} = list{i,1};
% newtable{i,3} = list{i,2};
% newtable{i,4} = list{i,3};
% temp = '';
% j = 0;
% if (isempty(list{i,4}) == 0)
% for k=1:length(list{i,4})
% temp = [temp '; ' list{i,4}{k}];
% end %k
% end %if
% newtable{i,5} = temp;
% end %if
% end %i
switch refine
case 0
for i=1:size(list,1)
newtable{i,1} = list{i,1};
newtable{i,2} = list{i,2};
newtable{i,3} = list{i,3};
newtable{i,4} = list{i,4};
newtable{i,5} = list{i,5};
temp = '';
for k=1:size(list{i,9},1)
paropen = '';
parclose = '';
if (list{i,9}{k,1} == true)
paropen = '(';
parclose = ')';
end %if
temp = [temp, ';', paropen, list{i,9}{k,2}, parclose];
end %k
newtable{i,6} = temp;
end %i
case 1
for i=1:size(list,1)
newtable{i,1} = list{i,1};
newtable{i,2} = list{i,2};
newtable{i,3} = list{i,3};
newtable{i,4} = list{i,4};
newtable{i,5} = list{i,5};
newtable{i,6} = list{i,6};
newtable{i,7} = list{i,7};
newtable{i,8} = list{i,8};
temp = '';
for k=1:size(list{i,9},1)
paropen = '';
parclose = '';
if (list{i,9}{k,1} == true)
paropen = '(';
parclose = ')';
end %if
temp = [temp, ';', paropen, list{i,9}{k,2}, parclose];
end %k
newtable{i,9} = temp;
end %i
end %switch refine