sym2poly(), take the last k+1 entries, poly2sym()
Or use coeffs('all') with two outputs, and take the last k+1 entries of the two outputs, dot product the two (that is, sum of the element-wise multiplications)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!