Cody

# Problem 153. Equidistant numbers containing certain value in an interval

Solution 1955549

Submitted on 2 Oct 2019
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
lb = 0; ub = 10; d = 1; val = 3; y_correct = [0 1 2 3 4 5 6 7 8 9 10]; assert(isequal(equidistant_points(lb, ub, d, val), y_correct))

Unrecognized function or variable 'vla'. Error in equidistant_points (line 2) [val:-d:lb (vla+d):d:ub] Error in Test1 (line 6) assert(isequal(equidistant_points(lb, ub, d, val), y_correct))

2   Fail
lb = 0; ub = 10; d = 2; val = 5; y_correct = [1 3 5 7 9]; assert(isequal(equidistant_points(lb, ub, d, val), y_correct))

Unrecognized function or variable 'vla'. Error in equidistant_points (line 2) [val:-d:lb (vla+d):d:ub] Error in Test2 (line 6) assert(isequal(equidistant_points(lb, ub, d, val), y_correct))

3   Fail
lb = 0; ub = 10; d = 2.2; val = 6.1; y_correct = [1.7 3.9 6.1 8.3]; assert(max(abs(equidistant_points(lb, ub, d, val) - y_correct)) < 1e-15)

Unrecognized function or variable 'vla'. Error in equidistant_points (line 2) [val:-d:lb (vla+d):d:ub] Error in Test3 (line 6) assert(max(abs(equidistant_points(lb, ub, d, val) - y_correct)) < 1e-15)