Given a polynomial p known to have positive integer coefficients, deduce the values of the coefficients.
p = @(x) x^2 + 2*x + 15;
c = guess_the_coefficients(p);
c = [1 2 15]
Used to thought this function was banned. never went to that direction. nice touch!
@Bainhome, Cody banned the reverse of this function because it could be used as a cheat to unfairly reduce Cody score. I do believe the function used cannot be in such manner...so it is not banned and free for your use. Enjoy!. :)
@Bainhome, Cody banned the reverse of this function because it could be used as a cheat to unfairly reduce Cody score. I do believe the other function cannot be used for such purpose...so it is not banned and free for your use. Enjoy!. :)
This only works for coefficients<100.
Filter values in a vector
Size of this cup?
Back to basics 21 - Matrix replicating
Sum of diagonal of a square matrix
Largest Twin Primes
Set a Soroban Abacus
Test if two numbers have the same digits
Project Euler: Problem 16, Sums of Digits of Powers of Two
Number of Circles in a Number
Solve the Sudoku Row
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office