-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIdReaction.m
49 lines (46 loc) · 1.17 KB
/
IdReaction.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
function type = IdReaction(GasReact,SurfReact,GasProd,SurfProd)
type = 0;
if ~isempty(GasReact)
if ~isempty(SurfReact)
disp('Reaction unknown');
else
if ~isempty(GasProd);
disp('Reaction unknown');
else
if ~isempty(SurfProd)
if length(SurfProd)==1
type=1;
end
if length(SurfProd)==2
if strcmp(SurfProd(1),SurfProd(2))==1
type=2;
else
type=4;
end
end
else
disp('No Prodocuts insert');
end
end
end
else
if ~isempty(SurfReact)
if ~isempty(GasProd)
disp('Reaction unknown');
else
if ~isempty(SurfProd)
if length(SurfReact)==1
type=5;
end
if length(SurfReact)==2
type=6;
end
else
disp('No Prodocuts insert');
end
end
else
disp ('No Reactants or Products insert for this reaction');
end
end
end