-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrange_check.m
47 lines (34 loc) · 1.36 KB
/
range_check.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
function res_data = range_check(input_param)
check_grid = {};
check_grid{1,1} = 'no_of_grids_check';
check_grid{1,2} = input_param(1,1) > 0;
check_grid{2,1} = 'no_of_apr_check';
check_grid{2,2} = input_param(2,1) > 0;
check_grid{3,1} = 'SG_thickness_check';
check_grid{3,2} = input_param(3,1) > 0;
check_grid{4,1} = 'AG_thickness_check';
check_grid{4,2} = input_param(4,1) > 0;
check_grid{5,1} = 'SG_apr_check';
check_grid{5,2} = input_param(5,1) > 0;
check_grid{6,1} = 'AG_apr_check';
check_grid{6,2} = input_param(6,1) > 0;
check_grid{7,1} = 'gap_check';
check_grid{7,2} = input_param(7,1) > 0;
check_grid{8,1} = 'SG_voltage_check';
check_grid{8,2} = input_param(8,1) > 0;
check_grid{9,1} = 'AG_voltage_check';
check_grid{9,2} = input_param(9,1) < 0;
check_grid{10,1} = 'Resol_check';
check_grid{10,2} = input_param(10,1) > 0;
check_grid{11,1} = 'LenX_check1';
check_grid{11,2} = input_param(11,1) > 0;
check_grid{12,1} = 'LenY_check1';
check_grid{12,2} = input_param(12,1) > 0;
check_grid{13,1} = 'LenX_check2';
check_grid{13,2} = input_param(11,1) > (input_param(3,1)*input_param(1,1)/2 + (input_param(4,1)*input_param(1,1))/2 + input_param(7,1) + input_param(13,1));
if any([check_grid{:,2}] ~= 0)
res_data = 0;
else
res_data = 1;
end
end