Cody

# Problem 44314. A Simple Tide Gauge with MATLAB

Solution 2453679

Submitted on 2 Jun 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
A = [5 8 10 12 8 13 14 10 10 15]; tide_correct = 1; assert(isequal(gauge(A),tide_correct))

Unrecognized function or variable 'a'. Error in gauge (line 2) tide=sum(diff(a))>0 Error in Test1 (line 3) assert(isequal(gauge(A),tide_correct))

2   Fail
A = [15 16 11 9 10 15 7 12 6 11 5 6]; tide_correct = 0; assert(isequal(gauge(A),tide_correct))

Unrecognized function or variable 'a'. Error in gauge (line 2) tide=sum(diff(a))>0 Error in Test2 (line 3) assert(isequal(gauge(A),tide_correct))

3   Fail
A = [9 15 3 9 5 18 4 17 18 19 8 13 12 21 17 24]; tide_correct = 1; assert(isequal(gauge(A),tide_correct))

Unrecognized function or variable 'a'. Error in gauge (line 2) tide=sum(diff(a))>0 Error in Test3 (line 3) assert(isequal(gauge(A),tide_correct))

4   Fail
A = [22 12 22 12 9 14 17 16 15 8 13 6 10 7 13 3]; tide_correct = 0; assert(isequal(gauge(A),tide_correct))

Unrecognized function or variable 'a'. Error in gauge (line 2) tide=sum(diff(a))>0 Error in Test4 (line 3) assert(isequal(gauge(A),tide_correct))