-
Notifications
You must be signed in to change notification settings - Fork 0
/
step5.m
60 lines (47 loc) · 1.73 KB
/
step5.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
function step5
global sec;
global Foward1; global Foward2; global Foward3;
global Foward4; global Foward5; global Foward6;
global Foward7; global Foward8; global Foward9;
global Up1; global Up2; global Up3;
global Up4; global Up5; global Up6;
global Up7; global Up8; global Up9;
global Down1; global Down2; global Down3;
global Down4; global Down5; global Down6;
global Down7; global Down8; global Down9;
global Left1; global Left2; global Left3;
global Left4; global Left5; global Left6;
global Left7; global Left8; global Left9;
global Right1; global Right2; global Right3;
global Right4; global Right5; global Right6;
global Right7; global Right8; global Right9;
global Back1; global Back2; global Back3;
global Back4; global Back5; global Back6;
global Back7; global Back8; global Back9;
while(Foward5.UserData~=Foward2.UserData)...
||(Right5.UserData~=Right2.UserData)...
||(Left5.UserData~=Left2.UserData)...
||(Back5.UserData~=Back2.UserData)
if(Foward5.UserData==Foward2.UserData)&&(Left5.UserData==Left2.UserData) %5´Ü°è ±âº»Çü
algorithm(10)
elseif(Foward5.UserData==Foward2.UserData)&&(Right5.UserData==Right2.UserData)
Rotation_function(17)
pause(sec);
elseif(Right5.UserData==Right2.UserData)&&(Back5.UserData==Back2.UserData)
Rotation_function(17)
pause(sec);
Rotation_function(17)
pause(sec);
elseif(Back5.UserData==Back2.UserData)&&(Left5.UserData==Left2.UserData)
Rotation_function(18)
pause(sec);
elseif(Foward5.UserData==Foward2.UserData)&&(Back5.UserData==Back2.UserData)%5´Ü°è ¿¹¿ÜÇü
algorithm(11)
elseif(Right5.UserData==Right2.UserData)&&(Left5.UserData==Left2.UserData)
Rotation_function(17)
pause(sec);
else
Rotation_function(1)
pause(sec);
end
end