I try to sort a list in this way I have a polynomial
DeleteCases[Table[Cos[(2 π)/3 k] z^k, {k, 0, 8}], 0, {-1}]
gives
{1, -(z/2), -(z^2/2), z^3, -(z^4/2), -(z^5/2), z^6, -(z^7/2), -(z^8/2)}
and will like to sort in alternative array as
{1, -(z/2), z^3, -(z^2/2), z^6, -(z^4/2), -(z^5/2), -(z^7/2), -(z^8/2)}
and finally eliminate the positive elements of the array
{1, -(z/2), z^3, -(z^2/2), z^6}
and it is possible do it beginning with the polynomial then use CoefficientList
but doing this eliminate the z^k in the array
it will be someting like this
1 - z/2 - z^2/2 + z^3 - z^4/2 - z^5/2 + z^6 - z^7/2 - z^8/
2 -> {1, -(z/2), -(z^2/2), z^3, -(z^4/2), -(z^5/2),
z^6, -(z^7/2), -(z^8/2)} -> {1, -(z^2/2), -(z/2), z^3, -(z^4/2),
z^6, -(z^5/2), -(z^7/2), -(z^8/2)} -> {1, -(z^2/2), -(z/2),
z^3, -(z^4/2), z^6}
and the last array have to elimante the negative term to have a alternative serie. Thanks anyway as you may have noticed I'm a novice in mathematica
1
not a positive element? What isn1
on the summation? Could you please describe your sort algorithm in words? The question is unclear as presented and the desired result is ambiguous. $\endgroup$z^2
come before thez
term in the final list? Why isn't there a term with a positive coefficient interposed between them? $\endgroup$