sym_coeffs

Symbolic

Extract polynomial coefficients from a symbolic expression. Returns [a_n, ..., a_1, a_0] (highest degree first). Uses differentiation to extract each coefficient.

Syntax

sym_coeffs(expr, var)

Examples

sym_coeffs('x^2 + 3*x + 5', 'x')
▶ Run
sym_coeffs('2*t^3 - t + 7', 't')
▶ Run

See Also

Try SimLab — Free MATLAB® Alternative

466 functions. Runs in your browser. No install.

Open SimLab

Stay Updated

Get notified about new simulations and tools. We send 1-2 emails per month.