-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsaveData.asv
More file actions
46 lines (44 loc) · 2.03 KB
/
saveData.asv
File metadata and controls
46 lines (44 loc) · 2.03 KB
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
% a is an array of strings, each index correspand to x,y of each drone
%distTh is an scalar for threshold of distance to sample
%angTh is an scalar for threshold of angular similarity
%s is the sample x,y as an scalar string
%c is the final strategy formed.
%row goes for several execution of game
%ALL PARAMETERS ARE ARRAYS OF STRINGS OR A CHARACTER
function sv = saveData(row,a,distTh,angTh,s,c)
folderName = strcat(pwd,'\','test');
File = strcat(folderName,'/','Dataset.xlsx');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Drones X,Y %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('A%d',row);
xlswrite(File,a,'Sheet1',loc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% distTh value %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('K%d',row);
xlswrite(File,distTh,'Sheet1',loc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% angTh value %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('L%d',row);
xlswrite(File,angTh,'Sheet1',loc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Sample X,Y %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('J%d',row);
xlswrite(File,cellstr(s),'Sheet1',loc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% coallition formed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('M%d',row);
xlswrite(File,cellstr(c),'Sheet1',loc);
% xlswrite(File,distTh,'Sheet1',
%%%%%%%%%%%%%%%%% 3 PLAYER %%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Drones X,Y %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('A%d',row);
xlswrite(File,a,'Sheet1',loc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% distTh value %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('K%d',row);
xlswrite(File,distTh,'Sheet1',loc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% angTh value %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('L%d',row);
xlswrite(File,angTh,'Sheet1',loc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Sample X,Y %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('J%d',row);
xlswrite(File,cellstr(s),'Sheet1',loc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% coallition formed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
loc=sprintf('M%d',row);
xlswrite(File,cellstr(c),'Sheet1',loc);
% xlswrite(File,distTh,'Sheet1',
end