-
Notifications
You must be signed in to change notification settings - Fork 16
/
init_name.m
49 lines (32 loc) · 803 Bytes
/
init_name.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
function [subject_id,eq_id,ari_id] = init_name()
choice = menu('Choose your name','Georgios','Josef','Other');
switch(choice)
case 1
subject_id = 104;
case 2
subject_id = 103;
otherwise
% Ask ID
prompt={'Your ID'};
answer = inputdlg(prompt);
subject_id = str2num(cell2mat(answer));
end
text = sprintf('Your ID: %i',subject_id);
% Get telation between subejcts_id and ari_id
switch (subject_id)
case 103
disp('Hi Josef!')
text = sprintf('%s, Josef',text);
eq_id = 2;
ari_id = 64;
case 104
disp('Hi Georgios!')
text = sprintf('%s, Georgios',text);
eq_id = 3;
ari_id = 65;
otherwise
disp('Hi Anonymus!')
eq_id = 1;
ari_id = 0;
end
end