So I have a factored polynomial of the form $(z-a)(z-b)(z-c)\ldots(z-n)$ for $n$ an even positive integer. Thus the coefficient of $z^k$ for $0 \le k < n$ will be the sum of all distinct $n-k$ element products taken from the set $\{a,b,\ldots,n\}$ multiplied by $(-1)^k$, I hope that makes sense, please ask if you need more clarification.
I'm trying to put these coefficients into a row vector with the first column containing the constant coefficient (which would be $abc\ldots n$) and the last column containing the coefficient for $z^n$ (which would be 1).
I imagine there is a way to brute force this with a ton of nested loops, but I'm hoping there is a more efficient way. This is being done in Matlab (which I'm not that familiar with) and I know Matlab has a ton of algorithms and functions, so maybe its got something I can use. Can anyone think of a way to do this?