Hi, I have a question about manipulating polynomials.
Suppose I have a group of polynomials, p1, p2, ... pN, and each polynomial pi is a function of x = [x1,x2,...,xn] in n variables, and each polynomial has degree less or equal to d.
Now I want to extract the coefficients of each polynomial pi, such that pi = coeff_i' * [x]_d, where [x]_d is the standard monomial basis of degree less or equal to d.
So essentially, I want to extract the big coefficient matrix such that:
[p1, p2, ..., pN]' =[coeff_1, coeff_2, ... coeff_N]' * [x]_d,
are written in the same basis [x]_d
I know that the function "coefficients" in YALMIP can extract the coefficients of each polynomial pi, but it does not return zeros for terms that are not in pi. So it would be messy to extract coefficients for each pi and then arrange them in the order of [x]_d with zero padding.
Is there an easy way of performing this? (the mutipoly package in SOSTOOLS can do this easily.)