Cody

# Problem 1476. Radial Zernike polynomials

Solution 1536170

Submitted on 22 May 2018 by cokakola
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

2   Pass
n = 0; m = 0; P_correct = [1]; assert(isequal(radialZernike(n,m),P_correct));

3   Pass
n = 1; m = 1; P_correct = [1 0]; assert(isequal(radialZernike(n,m),P_correct));

4   Pass
n = 2; m = 0; P_correct = [2 0 -1]; assert(isequal(radialZernike(n,m),P_correct));

5   Pass
n = 2; m = 2; P_correct = [1 0 0]; assert(isequal(radialZernike(n,m),P_correct));

6   Pass
n = 3; m = 1; P_correct = [3 0 -2 0]; assert(isequal(radialZernike(n,m),P_correct));

7   Pass
n = 3; m = 3; P_correct = [1 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

8   Pass
n = 4; m = 0; P_correct = [6 0 -6 0 1]; assert(isequal(radialZernike(n,m),P_correct));

9   Pass
n = 4; m = 2; P_correct = [4 0 -3 0 0]; assert(isequal(radialZernike(n,m),P_correct));

10   Pass
n = 4; m = 4; P_correct = [1 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

11   Pass
n = 5; m = 1; P_correct = [10 0 -12 0 3 0]; assert(isequal(radialZernike(n,m),P_correct));

12   Pass
n = 5; m = 3; P_correct = [5 0 -4 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

13   Pass
n = 5; m = 5; P_correct = [1 0 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

14   Pass
n = 6; m = 0; P_correct = [20 0 -30 0 12 0 -1]; assert(isequal(radialZernike(n,m),P_correct));

15   Pass
n = 6; m = 2; P_correct = [15 0 -20 0 6 0 0]; assert(isequal(radialZernike(n,m),P_correct));

16   Pass
n = 6; m = 4; P_correct = [6 0 -5 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

17   Pass
n = 6; m = 6; P_correct = [1 0 0 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

18   Pass
n = 7; m = 1; P_correct = [35 0 -60 0 30 0 -4 0]; assert(isequal(radialZernike(n,m),P_correct));

19   Pass
n = 7; m = 3; P_correct = [21 0 -30 0 10 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

20   Pass
n = 7; m = 5; P_correct = [7 0 -6 0 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

21   Pass
n = 7; m = 7; P_correct = [1 0 0 0 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

22   Pass
n = 8; m = 0; P_correct = [70 0 -140 0 90 0 -20 0 1]; assert(isequal(radialZernike(n,m),P_correct));

23   Pass
n = 8; m = 2; P_correct = [56 0 -105 0 60 0 -10 0 0]; assert(isequal(radialZernike(n,m),P_correct));

24   Pass
n = 8; m = 4; P_correct = [28 0 -42 0 15 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

25   Pass
n = 8; m = 6; P_correct = [8 0 -7 0 0 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

26   Pass
n = 8; m = 8; P_correct = [1 0 0 0 0 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

27   Pass
n = 9; m = 1; P_correct = [126 0 -280 0 210 0 -60 0 5 0]; assert(isequal(radialZernike(n,m),P_correct));

28   Pass
n = 9; m = 3; P_correct = [84 0 -168 0 105 0 -20 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

29   Pass
n = 9; m = 5; P_correct = [36 0 -56 0 21 0 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

30   Pass
n = 9; m = 7; P_correct = [9 0 -8 0 0 0 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));

31   Pass
n = 9; m = 9; P_correct = [1 0 0 0 0 0 0 0 0 0]; assert(isequal(radialZernike(n,m),P_correct));