フィルターのクリア

Determine the coefficients in symbolic

3 ビュー (過去 30 日間)
Tobias Dehn Nielsen
Tobias Dehn Nielsen 2022 年 11 月 24 日
コメント済み: Paul 2022 年 11 月 25 日
On is dependent of In, On_1 and In_1. Is there a way to determine the coefficients multiplied on In, On_1 and In_1. On is of filetype sym.

採用された回答

Torsten
Torsten 2022 年 11 月 24 日
I don't know why the coefficients appear in the wrong order.
syms In In_1 On_1
On = 91/100*In-7/8*In_1+1/2*On_1;
coeffs(On,[In In_1 On_1])
ans = 
  5 件のコメント
Torsten
Torsten 2022 年 11 月 25 日
Looks like a bug for me.
Paul
Paul 2022 年 11 月 25 日
I'm not sure it's a bug.
The single output form for a univariate polynomial returns coefficients from lowest to highest order
syms x
c = coeffs([2*x^2 + 3*x + 1])
c = 
But the two output form returns from highest to lowest
[c,t] = coeffs([2*x^2 + 3*x + 1])
c = 
t = 
Seems odd, but both of those cases are documented behavior.
When using the second input argument, vars, I don't see anything in the doc that says that ordering of c corresponds to the order in vars. The doc has a bunch of examples, but it doesn't really explain the process for how it orders c and t.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConversion Between Symbolic and Numeric についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by