Cody

Solution 1973775

Submitted on 13 Oct 2019 by Nikolaos Nikolaou
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   Pass
a = 1; offset = 2 y_correct = 3; assert(isequal(constant_offset(a,offset),y_correct))

offset = 2 y = 3

2   Pass
a = [-1 1]; offset = 2 y_correct = [1 3]; assert(isequal(constant_offset(a,offset),y_correct))

offset = 2 y = 1 3

3   Pass
a = [-10:1:1]; offset = 10 y_correct = [0:11]; assert(isequal(constant_offset(a,offset),y_correct))

offset = 10 y = 0 1 2 3 4 5 6 7 8 9 10 11

Suggested Problems

More from this Author9