how to split num to str ?

1 回表示 (過去 30 日間)
tomer polsky
tomer polsky 2018 年 6 月 28 日
編集済み: madhan ravi 2019 年 1 月 24 日
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 件のコメント
OCDER
OCDER 2018 年 6 月 28 日
I think so. Are you using or do you have symbolic math toolbox?

サインインしてコメントする。

回答 (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)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by