Cody

# Problem 1304. Hermite Polynomials

Solution 1698296

Submitted on 21 Dec 2018 by Martin C.
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
user_solution = fileread('hermite_poly.m'); assert(isempty(strfind(user_solution,'regexp'))); assert(isempty(strfind(user_solution,'2str'))); assert(isempty(strfind(user_solution,'str2'))); assert(isempty(strfind(user_solution,'interp'))); assert(isempty(strfind(user_solution,'printf'))); assert(isempty(strfind(user_solution,'assert')));

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

p = 1

3   Pass
n = 1; P_correct = [2 0]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0

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

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2

5   Pass
n = 3; P_correct = [8 0 -12 -0]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0

6   Pass
n = 4; P_correct = [16 0 -48 -0 12]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12

7   Pass
n = 5; P_correct = [32 0 -160 -0 120 0]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0

8   Pass
n = 6; P_correct = [64 0 -480 -0 720 0 -120]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120

9   Pass
n = 7; P_correct = [128 0 -1344 -0 3360 0 -1680 -0]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0

10   Pass
n = 8; P_correct = [256 0 -3584 -0 13440 0 -13440 -0 1680]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0 p1 = 256 0 -2688 0 6720 0 -3360 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p2 = -896 0 6720 0 -10080 0 1680 le = 2 p = 256 0 -3584 0 13440 0 -13440 0 1680

11   Pass
n = 9; P_correct = [512 0 -9216 -0 48384 0 -80640 -0 30240 0]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0 p1 = 256 0 -2688 0 6720 0 -3360 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p2 = -896 0 6720 0 -10080 0 1680 le = 2 p = 256 0 -3584 0 13440 0 -13440 0 1680 p1 = 512 0 -7168 0 26880 0 -26880 0 3360 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0 p2 = -2048 0 21504 0 -53760 0 26880 0 le = 2 p = 512 0 -9216 0 48384 0 -80640 0 30240 0

12   Pass
n = 10; P_correct = [1024 0 -23040 -0 161280 0 -403200 -0 302400 0 -30240]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0 p1 = 256 0 -2688 0 6720 0 -3360 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p2 = -896 0 6720 0 -10080 0 1680 le = 2 p = 256 0 -3584 0 13440 0 -13440 0 1680 p1 = 512 0 -7168 0 26880 0 -26880 0 3360 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0 p2 = -2048 0 21504 0 -53760 0 26880 0 le = 2 p = 512 0 -9216 0 48384 0 -80640 0 30240 0 p1 = 1024 0 -18432 0 96768 0 -161280 0 60480 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32...

13   Pass
n = 11; P_correct = [2048 0 -56320 -0 506880 0 -1774080 -0 2217600 0 -665280 -0]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0 p1 = 256 0 -2688 0 6720 0 -3360 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p2 = -896 0 6720 0 -10080 0 1680 le = 2 p = 256 0 -3584 0 13440 0 -13440 0 1680 p1 = 512 0 -7168 0 26880 0 -26880 0 3360 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0 p2 = -2048 0 21504 0 -53760 0 26880 0 le = 2 p = 512 0 -9216 0 48384 0 -80640 0 30240 0 p1 = 1024 0 -18432 0 96768 0 -161280 0 60480 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32...

14   Pass
n = 12; P_correct = [4096 0 -135168 -0 1520640 0 -7096320 -0 13305600 0 -7983360 -0 665280]; assert(isequal(hermite_poly(n),P_correct));

p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0 p1 = 256 0 -2688 0 6720 0 -3360 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p2 = -896 0 6720 0 -10080 0 1680 le = 2 p = 256 0 -3584 0 13440 0 -13440 0 1680 p1 = 512 0 -7168 0 26880 0 -26880 0 3360 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p2 = -384 0 1920 0 -1440 0 le = 2 p = 128 0 -1344 0 3360 0 -1680 0 p2 = -2048 0 21504 0 -53760 0 26880 0 le = 2 p = 512 0 -9216 0 48384 0 -80640 0 30240 0 p1 = 1024 0 -18432 0 96768 0 -161280 0 60480 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32 0 -160 0 120 0 p1 = 64 0 -320 0 240 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p2 = -160 0 480 0 -120 le = 2 p = 64 0 -480 0 720 0 -120 p1 = 128 0 -960 0 1440 0 -240 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p1 = 16 0 -24 0 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p2 = -24 0 12 le = 2 p = 16 0 -48 0 12 p1 = 32 0 -96 0 24 0 p = 2 0 p1 = 4 0 0 p = 1 p2 = -2 le = 2 p = 4 0 -2 p1 = 8 0 -4 0 p = 2 0 p2 = -8 0 le = 2 p = 8 0 -12 0 p2 = -64 0 96 0 le = 2 p = 32...

### Community Treasure Hunt

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

Start Hunting!