how to split num to str ?

3 次查看(过去 30 天)
tomer polsky
tomer polsky 2018-6-28
hello I want to to split a number to str . for exmaple if I write y=-x-2
then I want to get coffient of x
coffient_of_x=-1
k=-2
is it posbile ?

回答(1 个)

madhan ravi
madhan ravi 2018-7-5
编辑:madhan ravi 2019-1-24
It’s possible using symbolic math toolbox.
syms x y
y=-x-2
coeffs(y)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by