Cody

# Problem 1464. Laguerre polynomials

Solution 3773598

Submitted on 22 Nov 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
user_solution = fileread('laguerrePoly.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')));

Error using fileread (line 23) Could not open file laguerrePoly.m. No such file or directory. Error in Test1 (line 1) user_solution = fileread('laguerrePoly.m');

2   Fail
n = 0; P_correct = [1]/1; assert(isequal(round(laguerrePoly(n)*1),round(P_correct*1)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test2 (line 3) assert(isequal(round(laguerrePoly(n)*1),round(P_correct*1)));

3   Fail
n = 1; P_correct = [-1 1]/1; assert(isequal(round(laguerrePoly(n)*1),round(P_correct*1)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test3 (line 3) assert(isequal(round(laguerrePoly(n)*1),round(P_correct*1)));

4   Fail
n = 2; P_correct = [1 -4 2]/2; assert(isequal(round(laguerrePoly(n)*2),round(P_correct*2)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test4 (line 3) assert(isequal(round(laguerrePoly(n)*2),round(P_correct*2)));

5   Fail
n = 3; P_correct = [-1 9 -18 6]/6; assert(isequal(round(laguerrePoly(n)*6),round(P_correct*6)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test5 (line 3) assert(isequal(round(laguerrePoly(n)*6),round(P_correct*6)));

6   Fail
n = 4; P_correct = [1 -16 72 -96 24]/24; assert(isequal(round(laguerrePoly(n)*24),round(P_correct*24)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test6 (line 3) assert(isequal(round(laguerrePoly(n)*24),round(P_correct*24)));

7   Fail
n = 5; P_correct = [-1 25 -200 600 -600 120]/120; assert(isequal(round(laguerrePoly(n)*120),round(P_correct*120)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test7 (line 3) assert(isequal(round(laguerrePoly(n)*120),round(P_correct*120)));

8   Fail
n = 6; P_correct = [1 -36 450 -2400 5400 -4320 720]/720; assert(isequal(round(laguerrePoly(n)*720),round(P_correct*720)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test8 (line 3) assert(isequal(round(laguerrePoly(n)*720),round(P_correct*720)));

9   Fail
n = 7; P_correct = [-1 49 -882 7350 -29400 52920 -35280 5040]/5040; assert(isequal(round(laguerrePoly(n)*5040),round(P_correct*5040)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test9 (line 3) assert(isequal(round(laguerrePoly(n)*5040),round(P_correct*5040)));

10   Fail
n = 8; P_correct = [1 -64 1568 -18816 117600 -376320 564480 -322560 40320]/40320; assert(isequal(round(laguerrePoly(n)*40320),round(P_correct*40320)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test10 (line 3) assert(isequal(round(laguerrePoly(n)*40320),round(P_correct*40320)));

11   Fail
n = 9; P_correct = [-1 81 -2592 42336 -381024 1905120 -5080320 6531840 -3265920 362880]/362880; assert(isequal(round(laguerrePoly(n)*362880),round(P_correct*362880)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test11 (line 3) assert(isequal(round(laguerrePoly(n)*362880),round(P_correct*362880)));

12   Fail
n = 10; P_correct = [1 -100 4050 -86400 1058400 -7620480 31752000 -72576000 81648000 -36288000 3628800]/3628800; assert(isequal(round(laguerrePoly(n)*3628800),round(P_correct*3628800)));

Undefined function 'laguerrePoly' for input arguments of type 'double'. Error in Test12 (line 3) assert(isequal(round(laguerrePoly(n)*3628800),round(P_correct*3628800)));

### Community Treasure Hunt

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

Start Hunting!