Finding coefficients from factorized polynomial?
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
I have a simple factorized polynomial z = (x+y)^n and I'm trying to find the coefficients for any "n", so I wrote the following code:
n = input('n: ');
syms x y
z = (x+y)^n;
c = coeffs(z)
My idea is that I'm trying to find the coefficients for when z is some power (say, n = 3; (x+y)^3), but when I run the script it runs forever and I can't pause/stop it, which then I keep having to force-close MATLAB. I reckon the script isn't running because z is factorized, so is there a way for the coeffs function to work for polynomials in the form (x+y)^n ?
Risposta accettata
Più risposte (0)
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!