Back to Forum  View unanswered posts  View active topics
Topic review  monomial's coefficient 
Author 
Message 


Post subject: 
Re: monomial's coefficient 





Posted: Tue May 24, 2016 4:29 pm 





Post subject: 
Re: monomial's coefficient 


There is 'coeffs' command for this. ring r = 0,(x,y,z),dp; poly f = 2 x ^ 3 + 5z^3; > coeffs(f,x); _[1,1]=5z3 //coefficient of x^0 _[2,1]=0 // coeff of x^1 _[3,1]=0 // coeff of x^2 _[4,1]=2 // coeff of x^3
If you need to extract a specific entry from this matrix, directly specify the position, > coeffs(f,x)[4,1]; //For x^3 2
Similarly for other ring variables. It shouldn't be too difficult to convert it into a function.
There is 'coeffs' command for this. ring r = 0,(x,y,z),dp; poly f = 2 x ^ 3 + 5z^3; > coeffs(f,x); _[1,1]=5z3 //coefficient of x^0 _[2,1]=0 // coeff of x^1 _[3,1]=0 // coeff of x^2 _[4,1]=2 // coeff of x^3
If you need to extract a specific entry from this matrix, directly specify the position, > coeffs(f,x)[4,1]; //For x^3 2
Similarly for other ring variables. It shouldn't be too difficult to convert it into a function.




Posted: Tue May 24, 2016 7:49 am 





Post subject: 
monomial's coefficient 


friends, I'm looking for a singular procedure to return a given monomial's coefficient of a polynomial.
Example poly f = 2 x ^ 3 + 5z^3; test (f, x ^ 3) // > 2 test (f, y ^ 3) // > 0 who can help me?
friends, I'm looking for a singular procedure to return a given monomial's coefficient of a polynomial.
Example poly f = 2 x ^ 3 + 5z^3; test (f, x ^ 3) // > 2 test (f, y ^ 3) // > 0 who can help me?




Posted: Mon May 23, 2016 9:36 pm 





It is currently Tue Aug 14, 2018 3:52 pm

