Return the coefficients of nth (n>=0) Nuemann polynomial, (a sequence in 1/t) as polynomials in alpha.
The expected output is a cell array, with each element as a polynomial in increasing powers of alpha. For example -
%Note - The coefficient of 1/t^0 will always be 0
n=1;
O1(alpha)(t)=2*(1+alpha)/t^2
Output = {[0], [2 2]}
%explanation - Coefficient of 1/t^1 1/t^2 in which each element is polynomial in alpha
n=3;
O3(alpha)(t)=2*(1+alpha)*(3+alpha)/t^2 + 8*(1+alpha)*(2+alpha)*(3+alpha)/t^4
Output = {[0], [2 8 6], [0], [8 48 88 48]}
%explanation - Coefficient of 1/t^1 1/t^2 1/t^3 1/t^4
Solution Stats
Problem Comments
5 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers6
Suggested Problems
-
Calculate the area of a triangle between three points
3413 Solvers
-
Removing rows from a matrix is easy - but what about inserting rows?
263 Solvers
-
Return a list sorted by number of consecutive occurrences
427 Solvers
-
395 Solvers
-
Fix the last element of a cell array
1752 Solvers
More from this Author44
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Great problem, Dyuman! This required quite some thought.
Banning "if" outright is a bit too much BTW. I understand you want to discourage lookup solutions, but this messed with my legitimate solution and required me to get creative.
Glad to know you liked it!
I can get around the test suite with some changes/updates, keeping in mind that I created this problem 3 years ago.
What do you suggest a good alternative would be?
Maybe I could ban str2num() instead, allowing if?
It depends on why you banned "if" in the first place, but if it is indeed look-up solutions, maybe "elseif" would catch most (not all, but it's not Pokémon, you can't catch 'em all anyway).
It was indeed to ban look-up/hard coded solutions. I have updated the test suite to check for 'elseif' and 'str2num' in place of 'if'.
I have re-scored your solutions, Christian.
As per the rest of the pokemons, well leave those to me ;)
Thanks, Dyuman!