Test  Status  Code Input and Output 

1  Pass 
inequality = '2x + 3y >= 24';
point = [0, 0]
y_correct = 0;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
0 0

2  Pass 
inequality = '2x + 3y >= 24';
point = [0, 8]
y_correct = 1;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
0 8

3  Pass 
inequality = 'x + 7y > 84';
point = [0, 12]
y_correct = 0;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
0 12

4  Pass 
inequality = 'x + y < 5';
point = [5, 0]
y_correct = 0;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
5 0

5  Pass 
inequality = 'x + y < 5';
point = [1, 10]
y_correct = 1;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
1 10

6  Pass 
inequality = '9x  8y <= 15';
point = [0, 0]
y_correct = 0;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
0 0

7  Pass 
inequality = '1/2x  8/7y <= 9/8';
point = [0, 0]
y_correct = 1;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
0 0

8  Pass 
inequality = '0.875x  y > 15.75';
point = [50, 90]
y_correct = 1;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
50 90

9  Pass 
inequality = '8/7y <= 9/8';
point = [0, 70]
y_correct = 0;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
0 70

10  Pass 
inequality = '9x <= 80';
point = [0, 7]
y_correct = 1;
assert(isequal(checkPoint(inequality, point),y_correct))
point =
0 7

11  Pass 
inequality = '5x + 4y <= 60';
for idx = 1:20
point = randi([50, 50],1,2);
y_correct = 5*point(1) + 4*point(2) <= 60;
assert(isequal(checkPoint(inequality, point),y_correct))
end

Make one big string out of two smaller strings
1135 Solvers
234 Solvers
Create a vector whose elements depend on the previous element
375 Solvers
Write c^3 as sum of two squares a^2+b^2
273 Solvers
282 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!