Cody

Solution 1918100

Submitted on 1 Sep 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
n = 0; A_correct = []; assert(isempty(your_fcn_name(n)))

y = [] y = []

Output argument "A" (and maybe others) not assigned during call to "your_fcn_name". Error in Test1 (line 3) assert(isempty(your_fcn_name(n)))

2   Fail
n = 1; A_correct = 1; assert(isequal(your_fcn_name(n),A_correct))

y = 0 y = 1

Output argument "A" (and maybe others) not assigned during call to "your_fcn_name". Error in Test2 (line 3) assert(isequal(your_fcn_name(n),A_correct))

3   Fail
n= 3; A_correct =[1.0000 0.5000 0.3333 0.5000 1.0000 0.6667 0.3333 0.6667 1.0000] assert(isequal((your_fcn_name(n)-A_correct<1e-3),ones(n)))

A_correct = 1.0000 0.5000 0.3333 0.5000 1.0000 0.6667 0.3333 0.6667 1.0000 y = 0 0 0 0 0 0 0 0 0 y = 3 2 1 2 2 1 1 1 1

Output argument "A" (and maybe others) not assigned during call to "your_fcn_name". Error in Test3 (line 5) assert(isequal((your_fcn_name(n)-A_correct<1e-3),ones(n)))

4   Fail
n=10 A_correct =[1.0000 0.5000 0.3333 0.2500 0.2000 0.1667 0.1429 0.1250 0.1111 0.1000 0.5000 1.0000 0.6667 0.5000 0.4000 0.3333 0.2857 0.2500 0.2222 0.2000 0.3333 0.6667 1.0000 0.7500 0.6000 0.5000 0.4286 0.3750 0.3333 0.3000 0.2500 0.5000 0.7500 1.0000 0.8000 0.6667 0.5714 0.5000 0.4444 0.4000 0.2000 0.4000 0.6000 0.8000 1.0000 0.8333 0.7143 0.6250 0.5556 0.5000 0.1667 0.3333 0.5000 0.6667 0.8333 1.0000 0.8571 0.7500 0.6667 0.6000 0.1429 0.2857 0.4286 0.5714 0.7143 0.8571 1.0000 0.8750 0.7778 0.7000 0.1250 0.2500 0.3750 0.5000 0.6250 0.7500 0.8750 1.0000 0.8889 0.8000 0.1111 0.2222 0.3333 0.4444 0.5556 0.6667 0.7778 0.8889 1.0000 0.9000 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000] assert(isequal((your_fcn_name(n)-A_correct<1e-3),ones(n)))

n = 10 A_correct = 1.0000 0.5000 0.3333 0.2500 0.2000 0.1667 0.1429 0.1250 0.1111 0.1000 0.5000 1.0000 0.6667 0.5000 0.4000 0.3333 0.2857 0.2500 0.2222 0.2000 0.3333 0.6667 1.0000 0.7500 0.6000 0.5000 0.4286 0.3750 0.3333 0.3000 0.2500 0.5000 0.7500 1.0000 0.8000 0.6667 0.5714 0.5000 0.4444 0.4000 0.2000 0.4000 0.6000 0.8000 1.0000 0.8333 0.7143 0.6250 0.5556 0.5000 0.1667 0.3333 0.5000 0.6667 0.8333 1.0000 0.8571 0.7500 0.6667 0.6000 0.1429 0.2857 0.4286 0.5714 0.7143 0.8571 1.0000 0.8750 0.7778 0.7000 0.1250 0.2500 0.3750 0.5000 0.6250 0.7500 0.8750 1.0000 0.8889 0.8000 0.1111 0.2222 0.3333 0.4444 0.5556 0.6667 0.7778 0.8889 1.0000 0.9000 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000 y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y = 10 9 8 7 6 5 4 3 2 1 9 9 8 7 6 5 4 3 2 1 8 8 8 7 6 5 4 3 2 1 7 7 7 7 6 5 4 3 2 1 6 6 6 6 6 5 4 3 2 1 5 5 5 5 5 5 4 3 2 1 4 4 4 4 4 4 4 3 2 1 3 3 3 3 3 3 3 3 2 1 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1

Output argument "A" (and maybe others) not assigned during call to "your_fcn_name". Error in Test4 (line 13) assert(isequal((your_fcn_name(n)-A_correct<1e-3),ones(n)))