Cody

# Problem 1485. Method of Common Differences part-1

Solution 3491869

Submitted on 31 Oct 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
x = [1 4 9 16 25]; y_correct = [1 3 2]; assert(isequal(seq2commondiff(x),y_correct))

t = 3 5 7 9 s = 2 2 2

Output argument "y" (and maybe others) not assigned during call to "seq2commondiff". Error in Test1 (line 3) assert(isequal(seq2commondiff(x),y_correct))

2   Fail
x = [1 9 29 67 129 221]; y_correct = [1 8 12 6]; assert(isequal(seq2commondiff(x),y_correct))

t = 8 20 38 62 92 s = 12 18 24 30

Output argument "y" (and maybe others) not assigned during call to "seq2commondiff". Error in Test2 (line 3) assert(isequal(seq2commondiff(x),y_correct))

3   Fail
x = [3 4 9 23 51 98 169 269 403 576]; y_correct = [3 1 4 5]; assert(isequal(seq2commondiff(x),y_correct))

t = 1 5 14 28 47 71 100 134 173 s = 4 9 14 19 24 29 34 39

Output argument "y" (and maybe others) not assigned during call to "seq2commondiff". Error in Test3 (line 3) assert(isequal(seq2commondiff(x),y_correct))

4   Fail
x = [1 8 27 64 125 216]; y_correct = [1 7 12 6]; assert(isequal(seq2commondiff(x),y_correct))

t = 7 19 37 61 91 s = 12 18 24 30

Output argument "y" (and maybe others) not assigned during call to "seq2commondiff". Error in Test4 (line 3) assert(isequal(seq2commondiff(x),y_correct))

5   Fail
x = [2 0 2 9 22 42]; y_correct = [2 -2 4 1]; assert(isequal(seq2commondiff(x),y_correct))

t = -2 2 7 13 20 s = 4 5 6 7

Output argument "y" (and maybe others) not assigned during call to "seq2commondiff". Error in Test5 (line 3) assert(isequal(seq2commondiff(x),y_correct))

6   Fail
x=[1 8 28 67 131 226] y_correct = [1 7 13 6]; assert(isequal(seq2commondiff(x),y_correct))

x = 1 8 28 67 131 226 t = 7 20 39 64 95 s = 13 19 25 31

Output argument "y" (and maybe others) not assigned during call to "seq2commondiff". Error in Test6 (line 3) assert(isequal(seq2commondiff(x),y_correct))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!