-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmanual_selection.m
More file actions
executable file
·62 lines (40 loc) · 1.68 KB
/
manual_selection.m
File metadata and controls
executable file
·62 lines (40 loc) · 1.68 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function [Assigned_proj_roll_nos_fromCGPA,sorted_txt,txt3,sorted_CGPA] = ...
manual_selection(index,sorted_Roll_nos,sorted_txt,txt3,N_students,total_choices,sorted_CGPA)
delproj = @removingproj; % [sorted_txt] = removingproj(same_CGPA_project,sorted_txt,N_students)
assign = @assignment;
if size(sorted_txt,2) > 2+length(index) - 1
for s = 1 : length(index)
Rolls_for_manual(s)=(sorted_Roll_nos(index(s)));
projs_for_manual(s,:)= sorted_txt(index(s),2:2+length(index));
end
else
for s = 1 : length(index)
Rolls_for_manual(s)=(sorted_Roll_nos(index(s)));
projs_for_manual(s,:)= sorted_txt(index(s),2:end);
end
end
for i = 1: size(projs_for_manual,1)
for j = 1:size(projs_for_manual,2)
fullprojs_index = find(strcmpi(txt3(:,2),projs_for_manual(i,j)));
fullprojs(i,j) = txt3(fullprojs_index,1);
end
end
msg_gui = 'jfdsljfsldj';
[Decisions_gui,msg_gui] = ManualProjectAllocation(Rolls_for_manual',fullprojs);
while strcmpi(msg_gui,'jfdsljfsldj') == 1
pause(1)
end
if strcmpi(msg_gui,'Clash in user assigned choices. Make sure the choices are unique') == 1
msg = 'Clash in user assigned choices. Make sure the choices are unique';
error(msg)
end
for i = 1:length(Decisions_gui)
projs_index = find(strcmpi(txt3(:,1),Decisions_gui(i)));
projs_keyword(i) = txt3(projs_index,2);
sorted_txt = delproj(projs_keyword(i),sorted_txt,N_students);
txt3 = assign(projs_keyword(i),total_choices,txt3);
Assigned_proj_roll_nos(i,:) = string([projs_keyword(i) Rolls_for_manual(i)]);
sorted_CGPA(i,2) = 0;
end
Assigned_proj_roll_nos_fromCGPA = Assigned_proj_roll_nos;
end