Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: get coefficients from a symbolic polynomial
Replies: 6   Last Post: Jan 5, 2013 5:49 PM

 Messages: [ Previous | Next ]
 Nasser Abbasi Posts: 6,677 Registered: 2/7/05
Re: get coefficients from a symbolic polynomial
Posted: Jan 5, 2013 3:27 PM

On 1/5/2013 9:49 AM, Qiming wrote:

>
> Note that the entire polynomial is symbolic, that is, even the coefficients 0, 1, 2, 3
>are in symbolic form instead of numbers, so I cannot use 'sym2poly(y)' to get the coefficients.

Can you show why you can't? i.e. show what you tried, and the error you get, as it works for me:

EDU>> syms x
EDU>> y=3*x^3 + 2*x^2 + x;
EDU>> sym2poly(y)

ans =

3 2 1 0

--Nasser

Date Subject Author
1/5/13 Qiming
1/5/13 Nasser Abbasi
1/5/13 Nasser Abbasi
1/5/13 Qiming
1/5/13 Nasser Abbasi
1/5/13 Qiming
1/5/13 Qiming